|
well, I just tried something myself out of my imagination and it worked, well, somehow it worked! if you write:
<script>
function tt()
{
alert('hello!');
}
</script>
<form name="ourName">
<input type="Text" value="">
</form>
<a href="javascript: document.ourName.submit(); document.ourName.onsubmit = tt();">
<img src="About_On.jpg">
</a>
then by clicking on the image, it'll show you "hello!", I mean what the tt() function is supposed to do, but then it'll give you an error saying that "it was not implemented"! I dunno what it means in here! anyway, I think the problem is solved, coz it actually submits the form, and you can find it out from the fact that for example all your input fields become empty, and it shows that the submit was activated ( if it's not the reset that's activated!) and I needed that onsubmit event handler to run a function for evaluating my form's elements that I can do the same by running a function when someone clicks on the image, coz, well, when someone clicks that, then it means that it's gonna be submitted, and after running my evaluating function, I can have "document.formName.submit()", anyway, thanx for your help but it was better if we could have the onsubmit event handler working too, as it works in the <input type="image"> method.
Last edited by ConfusedOfLife; 08-05-2002 at 09:33 PM..
|