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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

server side javascript & select onChange

Status
Not open for further replies.

chrystine

Programmer
Jul 2, 2001
1
US
Hi,
I'm writing ASP using server-side javascript.
In my form 'form1', i have a drop-down list of items
to be selected from. In the select tag i have something like ..

Response.Write('<SELECT name=&quot;categories&quot; onChange=&quot;dothis()&quot;>');

I know that i can get at the selectedIndex with the code

<script language=javascript>
<!--
function dothis() {
index=document.form1.categories.selectedIndex;
choice=document.form1.categories.options[index].value;
}
//-->
</script>
But this is obviously client-side javascript since server-side doesn't recognize the document object. Does anyone know how to do this using strictly server-side javascript ?
Thanks alot for any attempt :)
 
I am also trying to figure that out.
How to get the client side scripts to access server side variables?

Rosh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top