mrprice_22
04-16-2003, 02:05 PM
Simple question I hope. Is there a way to open a new window and then make it invisible? Or better yet, can you open it and have it invisible from the get go?
Thanks,
Mark
Thanks,
Mark
|
Click to See Complete Forum and Search --> : Invisible Window mrprice_22 04-16-2003, 02:05 PM Simple question I hope. Is there a way to open a new window and then make it invisible? Or better yet, can you open it and have it invisible from the get go? Thanks, Mark havik 04-16-2003, 02:08 PM An invisible window? Why not just close it and re-open it when needed? Havik DrDaMour 04-16-2003, 02:19 PM document.style.visibility="hidden" maybe? i really doubt any browser would let you do this, as it would be a security risk. window.hide() ? i've never seen it done before and i doubt it's possible, beause if it was you'd see it a lot. imagine a hidden window that opens a new banner every few seconds like KAZAA, and you coudl never close it because you could never see it. Maybe with VBSCRIPT? viravan 04-16-2003, 02:37 PM Is there a way to open a new window and then make it invisible? Try to open the window and set screenX and screenY to a large negative number -- the window will be there but invisible. :) V.V. havik 04-16-2003, 02:49 PM screenX and screenY are just for NS though, right? you need to use top and left for a similar effect. I tried the negative values for this and the window was positioned at the default coordinates ( which was something like top=50, left=50 ). window.open('','', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=400,hei ght=175,left=-100,top=-100'); I think DrDaMour makes a good point about the security issues. An invisible window will make life on the web even more annoying than it already is. Havik viravan 04-16-2003, 03:09 PM It can be done, but guess you need to sign the script: Security Exceeding any of the boundaries of the screen (to hide some or all of a window) requires signed JavaScript, so a window won't move past the screen boundaries. You need the UniversalBrowserWrite privilege for this. For information on security in Navigator 4.0, see Chapter 7, "JavaScript Security," in the JavaScript Guide. :) V.V. mrprice_22 04-16-2003, 03:26 PM Maybe I should've just told you what I am trying to do. I have a drop down on a page. When a selection is made from the dropdown I need to take the value of the selected item, get some additional fields from a database based on that selection, and display them in a div or span section on that page. And I want to do all this without refreshing the page. Right now I am using the onchange option of the dropdown to open another window and run the ASP to get me the info I want. I then print it to a span section in that window and then set the innerHTML value of the span section on the parent/opener page equal to the innerHTML value of the span section in the new window. I then close the window. I would like to avoid this window being visible. Or maybe there’s a better way? DrDaMour 04-16-2003, 03:28 PM maybe make a hidden iframe? i don' t know if it will work, but i think it would webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |