passing variable to new window from form

Results 1 to 4 of 4

Thread: passing variable to new window from form

  1. #1
    Join Date
    Dec 1969
    Posts
    102

    Default passing variable to new window from form

    ok, I&#039ve got a form where the user puts a value in the form and I have a link on the same page as the form that opens a new window. Is it possible to pass a value a user enters in the form to the new window? I&#039ve tried session variables and querystrings, but it seems that the only thing that would work would be request.form, but it doesn&#039t, since it&#039s not a submit button(it&#039s a link) Thanks in advance for any help!

  2. #2
    Join Date
    Dec 1969
    Posts
    7

    Default Why do you not want to use a submit?(nt)

    fdgd

  3. #3
    Nathen Grass Guest

    Default RE: passing variable to new window from form

    This is possible to do but requires client-side scripting. In order to do it you would have to convert the url in your link to &#039window.open(url)&#039. Once you do this all of the elements in the parent window are exposed to the child window through the use of &#039window.opener.document&#039 in a script in the child window. So any value you have in the parent window can be reproduced in the child window by using this method.

  4. #4
    Brad Kingsley Guest

    Default RE: passing variable to new window from form

    Change the form to use an onSubmit event, then grab the variable from the form and pass it to a window.open function.<BR><BR>-Brad Kingsley, MCP - NT, IIS4<BR>Reliable Windows NT Web Hosting<BR>ORCS Web, Inc - http://www.ORCSWeb.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •