JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
open a new window and take value from this and close it Posted by jadav on 8 Mar 2005 at 10:45 PM
i have design a form by which i want to do like that

: 1.open a new window
: 2.in new window set the value for variable
: 3:close the window
: 4:return to main window
: 5:use the value of new variable


can any body help me???????????
Report
Re: open a new window and take value from this and close it Posted by Weirdofreak on 9 Mar 2005 at 10:07 AM
I did a thing like that once. There's a bettr way that I didn't think of at the time, though: Iframes. Popup blockers don't work on them, and they aren't intrusive.

You can creat an IFrame with var x = document.createElement('iframe') and use x.setAttribute('src', 'URL') to point it correctly. You may need to append it to the document with document.body.appendChild(x), but that may not be necessary. If it is, you should probably set the width and height to 1 so that it isn't noticeable. I think the new page can then be accessed with x.document, which of course can be traversed to find your info in the same way you can traverse any other document.
^D
$ shameless-plug
http://line-ed.sourceforge.net




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.