Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Variables and SUBMIT

Status
Not open for further replies.

itflash

Programmer
Jul 18, 2001
535
GB
Hi there

I am retrieving info from a db using vbscript.

I want to write away some session variables when a user clicks on a row in my list. However, this needs a form submit.

Is there any way to do this without a form submit?

The scenario is - the user can select multiple items usig checkboxes. I want to create a session variable array based on this selection before opening another brand new window.

 
You can't make server side variables (session variable) from the client side (because once the html output is delivered, there is no longer a connection open). What you should do is to create the session variable array at the beginning of the new page.

page1 html:
<form onSubmit=&quot;page2.asp&quot;>
<input type=checkbox name=&quot;box1&quot;>
<input type=checkbox name=&quot;box2&quot;>
</form>

page2.asp:
<%
if request(&quot;box1&quot;) = &quot;ON&quot; then session(&quot;Box1&quot;) = true ELSE session(&quot;box2=1&quot;) = false
if request(&quot;box2&quot;) = &quot;ON&quot; then session(&quot;Box2&quot;) = true ELSE session(&quot;box2&quot;) = false
%>
rest of page goes here....

Please Note: I'm not sure what the request(&quot;box1&quot;) returns when checked and not checked, but I think &quot;ON&quot; is returned when checked.... -- Just trying to help...
[wolf]<--- This is a wolf? We need a new icon.......
mikewolf@tst-us.com
 
Thanks for the reply.

Thats what I thought.
Didnt want to see the page repost, but if that is what it take.....

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top