Passing Variable Between Two Windows

Results 1 to 2 of 2

Thread: Passing Variable Between Two Windows

  1. #1
    Join Date
    Dec 1969

    Default Passing Variable Between Two Windows

    I am passing a varible to Java Script function. While displaying(alert) it gives the value of the variable. But i need this value to be pass to next page. I need that variable in that new window page. How to pass it and how to get in the next page.<BR><BR>if i give like,<BR><BR>&#060;script&#062;<BR>function openwin(x1)<BR> {<BR> alert(x1)<BR>"NewWindowPage.asp?x=x1")<BR> }<BR>&#060;/script&#062;<BR>&#060;%<BR>for i = 1 to 10 <BR>...<BR>next<BR>%&#062;<BR>&#060;input type="button" value="More Details" name="B3" onClick="javascript:openwin(&#060;% response.write i %&#062;)"&#062;<BR><BR><BR>Next Window Page Coding<BR>-----------------------<BR><BR>&#060;% Response.Write Request.QueryString("x") %&#062;<BR><BR><BR>I am getting result as x1 not the value of x1.<BR><BR><BR><BR><BR>Please Help me,<BR>Murugesan<BR><BR>

  2. #2
    Mike Shaffer Guest

    Default RE: Passing Variable Between Two Windows

    I&#039;m not so sure that this is the best way to do what you want, but I do know that you should change your JavaScript function to look more like this:<BR><BR>function openwin(x1) <BR>{ <BR>alert(x1) <BR>;NewWindowPage.asp?x=&#039;+x 1) <BR>} <BR><BR><BR>Hope this helps! ;-)

Posting Permissions

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