[RESOLVED] stupid javascript form.submit() problem
ok, I have a link calling a javascript function
Code:
<a href=updateuser.aspx?id=123 onclick=submitAction(10)>save</a>
then I have a function defined that changes a value of a hidden form element
Code:
<script language="javascript">
function submitAction(val) {
document.myform.action.value = val;
document.myform.submit();
}
</script>
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:
function submitAction(val) {
document.myform.action.value = val;
document.myform.submit();
alert('garbage');
}
I am at my wits end....can someone see what stupid thing I am doing wrong?
Re: stupid javascript form.submit() problem
Sorry, been busy the last few days.
wildcat, Thank You!! This was exactly my problem! This problem illustrates why I hate HTML so much :D. I hope this post will help someone else out in the future! Thanks again guys!
Sibby