You are here: irt.org | FAQ | JavaScript | Image | Q1119 [ previous next ]
The function you need is document.myForm.submit() It can be called form any event handler - a link is ok:
<form name="myForm"> <input name="whatImage" type="hidden"> </form> <a href="javascript:document.myForm.whatImage='image1';document.myForm.submit()"><img src="image1.gif"></a> <a href="javascript:document.myForm.whatImage='image2';document.myForm.submit()"><img src="image2.gif"></a>