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="categories" onChange="dothis()">');
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'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="categories" onChange="dothis()">');
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