• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

How to open a separate new window

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to open a new popup window that not depend on it's parent window. I'm using window.open inside javascript that display some message. when user click on the ok button of this window only then remaining code of my parent window are executing. I want to open a separate window to dispay a message so that if user not click on the ok button my code on the parent window still execute.
please help me!

Thanks,
Saurabh
 
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to HTML/Javascript.
 
Ranch Hand
Posts: 256
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what you need is a modal dialog box.

try
window.showModalDialog(url,....
 
Bear Bibeault
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be aware that modal boxes are IE-specific.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
Be aware that modal boxes are IE-specific.



Bear, I think you need to re-look at Mozilla. They have implemented it!

Eric
 
Bear Bibeault
Sheriff
Posts: 67590
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, let me re-phrase: be aware that modal dialogs are non-standard and some browsers support different prorietary means to implement them. showModalDialog, for example, is IE-specific.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
lol....
 
Saurabh Saha
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for replies.
I want to open a popup window in which I show some message and there would be a close button to close this window, if user does not close this window I want to close this window after 10 seconds.I had tried an example code with window.open as show below:

windowHandle = window.open('childPage.jsp','mywindow','width=400,height=200');
setTimeout('windowHandle.close()',10000);

It is working fine it open a new window and close this window after 10 seconds, but I can not send any argument by using window.open so I tried showModalDialog() to open a new window, I'm specific for IE so showModalDialog() is working fine in this browser. In my new code I'm using:
showModalDialog('childPage.jsp',ArgumentPassed,'dialogHeight:9;dialogWidth:27;help ff;status:no;fullscreen=no;unadorned=yes');
I want to close this window after 10 seconds.

Thanks,
Saurabh Saha
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
put the window.close() into the modal window code instead of the parent.

Eric
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic