Re: control ASP variables through Javascript

by "Cyanide _7" <leo7278(at)>

 Date:  Tue, 29 Feb 2000 05:05:35 CST
 To:  pbabcock(at)
 Cc:  hwg-languages(at)
  todo: View Thread, Original
the code between <% and %> is executed on the server, not by the browser. in 
this case, the code is read by the browser as:

function eModifyAccount(){
	return 0

because the asp script is executed and since no html is outputed, that gap 
is closed. - Cyanide_7

>HI all
>Is there a way to control ASP variables through the use of Javascript?
>What I want to do is have a javascript function that is called and then
>changes the value of a session variable.
>Here is the way I am tryign to do it:
><SCRIPT LANGUAGE=javascript>
>function eModifyAccount(){
>		document.writeln("<% session("cnstMode") = 2 %>")
>		document.forms[1].submit()
>		return 0
>	}
>The problem is that session("cnstMode") gets set to 2 everytime the page is
>loaded, not just when the function eModifyAccount() is called.
>Any ideas?
>Phil Babcock
>Lead Web Designer
>BGS Group Inc.

Get Your Private, Free Email at

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA