C
Chuck
I'm having trouble making a bit of Javascript work. I
have a form that preselects the user's previous selection
on return to the ASP page, but it only works as long as
no database is involved. Works great posting to "Other"
or "ASP" but as soon as the post is to a database the
code stops working. Here's the code:
****************
<%itemToSelect = Session("item1")%>
<script type "text/Javascript"><!--
function PreselectMyItem(itemToSelect)
{
var myDropDownList = document.forms(0).Center;
for (i = 0; i < myDropDownList.options.length;
i++)
{
if(myDropDownList.options.value ==
itemToSelect)
{
myDropDownList.options.selected = true;
break;
}
}
}
--></script>
</head>
<body onload="PreselectMyItem('<%=itemToSelect%>')">
******************
The form posts to a FP-generated database.
Any direction would be greatly appreciated!
Thanks.
Chuck
have a form that preselects the user's previous selection
on return to the ASP page, but it only works as long as
no database is involved. Works great posting to "Other"
or "ASP" but as soon as the post is to a database the
code stops working. Here's the code:
****************
<%itemToSelect = Session("item1")%>
<script type "text/Javascript"><!--
function PreselectMyItem(itemToSelect)
{
var myDropDownList = document.forms(0).Center;
for (i = 0; i < myDropDownList.options.length;
i++)
{
if(myDropDownList.options.value ==
itemToSelect)
{
myDropDownList.options.selected = true;
break;
}
}
}
--></script>
</head>
<body onload="PreselectMyItem('<%=itemToSelect%>')">
******************
The form posts to a FP-generated database.
Any direction would be greatly appreciated!
Thanks.
Chuck