open a new window and take value from this and close it - Programmers Heaven

Howdy, Stranger!

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

Categories

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.