By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,441 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

How to pass data between two window without Session??

P: n/a
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='javascript'> " & vbCrLf

ClientScript += "var features =" & ...........<--setup
height,width...etc

ClientScript += "window.open(B.aspx,'',features);" & vbCrLf

ClientScript += " </SCRIPT> "

If Not Me.IsClientScriptBlockRegistered("VBScript") Then

Me.RegisterClientScriptBlock("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 clientJavaScript As String

clientJavaScript += " <SCRIPT language='javascript'> " & vbCrLf

clientJavaScript &= " window.opener.Form1.textbox1.value = '" &
(whatever value) & "';" & vbCrLf

clientJavaScript &= " window.close(); " & vbCrLf

clientJavaScript &= "</script>"

Response.Write(clientJavaScript)

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?
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <3a**************************@posting.google.com >,
dr*********@aol.com enlightened us with...
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?


That hidden input should have worked. Did you make sure you called it
the right name, including character case? JS is case-sensitive. Maybe
you forgot to change the name when you changed it from a textbox to a
hidden input?
-------------------------------------------------
~kaeli~
Hey, if you got it flaunt it! If you don't, stare
at someone who does. Just don't lick the TV screen,
it leaves streaks.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.