Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

open a new window and take value from this and close it

jadavjadav Posts: 23Member
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???????????

Comments

  • WeirdofreakWeirdofreak Posts: 439Member
    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 [b]var x = document.createElement('iframe')[/b] and use [b]x.setAttribute('src', 'URL')[/b] to point it correctly. You may need to append it to the document with [b]document.body.appendChild(x)[/b], 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 [b]x.document[/b], 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

Sign In or Register to comment.