ok, I have a link calling a javascript function
then I have a function defined that changes a value of a hidden form elementCode:<a href=updateuser.aspx?id=123 onclick=submitAction(10)>save</a>
pretty damn simple so far right.....ok, well the link is clicked, in the Page_Load sub, I check the value of request.form("action") and attempt to take the appropriate action. When I check it the value is equal to NOTHING, which means the form never got submitted!! Now here's the kicker....when I put a meaningless alert box (see below) it works just fine!!?!?Code:<script language="javascript"> function submitAction(val) { document.myform.action.value = val; document.myform.submit(); } </script>
I am at my wits end....can someone see what stupid thing I am doing wrong?Code:function submitAction(val) { document.myform.action.value = val; document.myform.submit(); alert('garbage'); }




Reply With Quote