Re: Object Required: Session
Session is Server side (within ASP tags), you would need to use Client side cookies if you want to do it on click of a button.
Re: Object Required: Session
That means I cannot do the following:
VB Code:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<Title></Title>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language=vbscript>
Sub button1click()
Session.contents("lang_id")=0
end sub
Sub button2_onclick()
Session.contents("lang_id")=1
end sub
Sub button3_onclick()
Session.contents("lang_id")=3
end sub
Sub button4_onclick()
Session.contents("lang_id")=2
end sub
</script>
<link href="main.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></HEAD>
<BODY marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<TD><img src="trimg.gif" width="350" height="1">
<INPUT class=btn type=Button size=27 value=English name=button1 onclick="button1click()">
<INPUT class=btn type=Button size=27 value=Chinese name=button2>
<INPUT class=btn type=Button size=27 value=Hungarian name=button3>
<INPUT class=btn type=Button size=27 value=Spanish name=button4>
</TD>
</tr>
<tr><td colspan=2 bgcolor=#666666>
</tr>
</table>
</BODY>
</HTML>
Re: Object Required: Session
Right, you will either have to send the variables to another or the same page and do that within ASP tags, or if using Vbscript then would set a cookie. You could even do a location.href with javascript and send the variable to a frame inside the page which then sets the session in ASP ..
BTW, Vbscript only works in IE .. would be better to use Javascript, unless you are certain the clients will be using IE. .