hi, could any1 help me with this?
[It's a ".aspx" page.]
There're one button and one textbox on Page A.
click the button:
<Code Behind >
Dim ClientScript As String = ""
ClientScript += " <SCRIPT language='javas cript'> " & vbCrLf
ClientScript += "var features =" & ...........<--setup
height,width... etc
ClientScript += "window.open(B. aspx,'',feature s);" & vbCrLf
ClientScript += " </SCRIPT> "
If Not Me.IsClientScri ptBlockRegister ed("VBScript") Then
Me.RegisterClie ntScriptBlock(" VBScript", ClientScript)
End If
End Sub
The above JavaScript will open B.aspx in a new window; There're
several controls and a "Submit" button on Page B. Users could click
"Submit" button and pass all information generate on Page B to Page A.
Click the "Submit" button:
Dim clientJavaScrip t As String
clientJavaScrip t += " <SCRIPT language='javas cript'> " & vbCrLf
clientJavaScrip t &= " window.opener.F orm1.textbox1.v alue = '" &
(whatever value) & "';" & vbCrLf
clientJavaScrip t &= " window.close(); " & vbCrLf
clientJavaScrip t &= "</script>"
Response.Write( clientJavaScrip t)
This will pass the value to textbox1 on Page A, and also close Page B
(itself).
I have to done this without any session or cookie, and the code shows
above just done what I want EXCEPT.....I need the textbox (which
receive the data) on Page A to be invisible. I tried to set the
textbox <visible=false> , then the server will not render that textbox.
So I tried a <input type=hidden ID=hiddentxt name=hiddentxt> , and this
won't work also. Anyone can help me?
[It's a ".aspx" page.]
There're one button and one textbox on Page A.
click the button:
<Code Behind >
Dim ClientScript As String = ""
ClientScript += " <SCRIPT language='javas cript'> " & vbCrLf
ClientScript += "var features =" & ...........<--setup
height,width... etc
ClientScript += "window.open(B. aspx,'',feature s);" & vbCrLf
ClientScript += " </SCRIPT> "
If Not Me.IsClientScri ptBlockRegister ed("VBScript") Then
Me.RegisterClie ntScriptBlock(" VBScript", ClientScript)
End If
End Sub
The above JavaScript will open B.aspx in a new window; There're
several controls and a "Submit" button on Page B. Users could click
"Submit" button and pass all information generate on Page B to Page A.
Click the "Submit" button:
Dim clientJavaScrip t As String
clientJavaScrip t += " <SCRIPT language='javas cript'> " & vbCrLf
clientJavaScrip t &= " window.opener.F orm1.textbox1.v alue = '" &
(whatever value) & "';" & vbCrLf
clientJavaScrip t &= " window.close(); " & vbCrLf
clientJavaScrip t &= "</script>"
Response.Write( clientJavaScrip t)
This will pass the value to textbox1 on Page A, and also close Page B
(itself).
I have to done this without any session or cookie, and the code shows
above just done what I want EXCEPT.....I need the textbox (which
receive the data) on Page A to be invisible. I tried to set the
textbox <visible=false> , then the server will not render that textbox.
So I tried a <input type=hidden ID=hiddentxt name=hiddentxt> , and this
won't work also. Anyone can help me?
Comment