I have a form with a javascript validation function OnSubmit. In the validation function I need to use ASP to set the value of a field to a session value. I tried the following, but it does not work. Let's assume Session("customerNumber") = 30143, then I want document.myForm.customerNumber.value = "30143"
function Validate()
{
document.myForm.customerNumber.value = "<% Session("customerNumber")%>"
return true;
}
function Validate()
{
document.myForm.customerNumber.value = "<% Session("customerNumber")%>"
return true;
}