Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Pop up modal browser window inside another browser

Reply
Thread Tools

Pop up modal browser window inside another browser

 
 
Jimmy
Guest
Posts: n/a
 
      08-14-2007
Is it possible to open a pop-up browser window (modal-style) inside
another browser?

e.g.
// assuming something is calling this function inside the html as some
event got triggered
function doSomethingInDiffWindow() {
// do something
// open up a pop-up modal window
// continue back on doing something after pop-up modal window
closed
}

Thanks,
Jimmy

 
Reply With Quote
 
 
 
 
David Golightly
Guest
Posts: n/a
 
      08-15-2007
On Aug 14, 2:06 pm, Jimmy <(E-Mail Removed)> wrote:
> Is it possible to open a pop-up browser window (modal-style) inside
> another browser?
>
> e.g.
> // assuming something is calling this function inside the html as some
> event got triggered
> function doSomethingInDiffWindow() {
> // do something
> // open up a pop-up modal window
> // continue back on doing something after pop-up modal window
> closed
>
> }
>
> Thanks,
> Jimmy


Got to get some terminology straight. "Browser" is shorthand for User
Agent, which is the "make" of a particular navigator (IE, Firefox,
Safari, etc.) Using standard client-side JS alone, there are no
straightforward techniques to get one "browser" to manipulate another.

What you probably mean (though I can't be sure) is "window", which
refers to the actual window of a particular browser. In JS, the
"window" is just another object, and your script can have references
to multiple windows (in general, as long as they're opened by a user-
triggered action in your script - most UAs now block script-triggered
popup windows).

So instead of using window.open, you want a window inside of a
window. Which means <iframe>. Making it modal is no mean task, but
you might investigate Lightbox http://www.huddletogether.com/projects/lightbox/
for relevant techniques. The code is there, I leave it for you to
inspect it.

-David

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-06-2007
David Golightly wrote:
> Got to get some terminology straight.


Yes, please. Eventually.

> "Browser" is shorthand for User Agent,


It isn't. Web browsers are a *subset* of ([X]HTML) user agents, and because
they are the greatest subset, many people (especially uninitiated) refer to
Web browsers only.

http://www.w3.org/TR/html401/conform...idx-user_agent

> which is the "make" of a particular navigator (IE, Firefox, Safari, etc.)


Depending on what you mean by "make" that statement may be wrong.

> Using standard client-side JS alone,


What would "standard client-side JS" be, knowing that any ECMAScript
implementation itself is proprietary by definition and different not
only by the ECMAScript standard's provision but also empirical proof?

> there are no straightforward techniques to get one "browser" to
> manipulate another.


Fair enough because of the "straightforward".

> What you probably mean (though I can't be sure) is "window", which refers
> to the actual window of a particular browser. In JS, the "window" is
> just another object,


Windows (and frames) are represented in the AOM of the UA as Window
objects. These objects are host objects which clearly distinct them
from native objects; they are _not_ part of the programming language,
but implementations of APIs.

> [...]
> So instead of using window.open, you want a window inside of a window.
> Which means <iframe>.


It could also be a `frame' element.

> Making it modal is no mean task,


It is an impossible task instead.

> but you might investigate Lightbox http://www.huddletogether.com/projects/lightbox/ for
> relevant techniques.


Rather not.

> The code is there, I leave it for you to inspect it.


I consider it bad advice to refer a newbie who is unable to make an educated
evaluation of code which authors themselves did not know what they were
doing to that code.


PointedEars, working down his TODO list
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      10-06-2007
On Aug 15, 12:35 pm, David Golightly <(E-Mail Removed)> wrote:

[snip]

Lightboxhttp://www.huddletogether.com/projects/lightbox/
> for relevant techniques. The code is there, I leave it for you to
> inspect it.


I tried, but the download link was a 404. No matter, it uses not only
Prototype but Scriptaculous (sp?) as well. In other words, it is 150K
+ to center an element. And since it is on version 2.02 and the
release notes indicate they didn't address supporting IE6 with "any
doctype" until 2.01, I think it is likely a lousy effort.

The correct answer to the question is that you can't make one element
modal unless you hide or disable every other element on the page. You
can stretch an element across the document all you want (provided CSS
is available), but this does nothing to prevent keyboard input and is
therefore useless for modality.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modal pop up like window.confirm Arnab das ASP .Net 4 03-24-2008 10:32 AM
Pop-up Modal Window magix Javascript 1 02-23-2008 03:22 AM
How to close a parent modal window when child modal window opens? gopal srinivasan Javascript 0 11-05-2004 05:59 AM
post the form data in modal window and close the modal window. Matt HTML 1 06-01-2004 08:22 PM
post the form data in modal window and close the modal window. Matt Javascript 0 06-01-2004 07:47 PM



Advertisments