Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 15th, 2004, 10:14 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default please help!

hi all,
By "window.showModalDialog()" I open a jsp page in a modal window in my web application and I want it to be invisible at first and depending on some parameters, it would be decided whether to show the modal or close it...
I tried putting it out of the screen and after the visibilith is decided for change its location but it failed to work :
window.showModalDialog("x.jsp",document,"dialogTop :5000px;dialogLeft:5000px");
but it still opens in the right bottom corner of the screen(not out of it).
Is there someway to make it invisible at first and then make it visible?


 
Old November 15th, 2004, 10:20 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Please give your posts sensible titles.

If you open a modal dialogue off screen or invisibly then the application will be locked and the user will be frozen out. What decides whether to show it? Can't you decide before opening the window?



--

Joe (Microsoft MVP - XML)
 
Old November 15th, 2004, 10:46 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's a long story...(I open a x.do struts page in the modal and there it'll be decided for it...)
But I can't decide for it on the current page.
But if there's a way to make it invisible be sure that it'll close immediatly automatically(by putting "window.close()" at the beggining of the page...).
And the reason for making it invisible is that I don't want to see the slight flash of the sudden opening and closing of the modal window, so first I make it invisible(somehows) and then I'll decide whether to show it normally or to close it by putting the appropriate javascript code at the beggining of the page with some JSTL code or something else...

 
Old November 15th, 2004, 10:54 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

In that case I think you're out of luck. Even opening a normal window off screen is now barred by XP SP 2. I think you need to change tactics. Have a hidden iframe that loads the page. If it turns out that it needs to be shown then you can take it from there.



--

Joe (Microsoft MVP - XML)
 
Old November 15th, 2004, 11:13 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't think I'm that much out of luck since I have xp sp 2 on my machine and I can move a page off the screen via "window.move(5000,5000)"
anyway...Ain't there someway just to make a modal invisible and then visible?










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.