Hello,
Not sure if this belongs to the JS forum or HTML but here it goes.
I have a form that is being submitted by JS. I do this because the underlying program needs the value of a submit button that was clicked .
I used to do this like this(standard)
[CODE]<input type=”Submit” name=”submit_button” value=”Search”/>
and
[CODE]<input type=”Submit” name=”submit_button” value=”Add”/>
However, due to the new requirements I had to replace standard submit buttons by an image, like this
[CODE]<input type=”image” name=”sbm” src=”search.gif”
id=”search” value=”Search” style=”padding: 1px;” alt=”Search” >
and
[CODE]<input type=”image” name=”sbm” src=”add.gif”
id=”add” value=”Add” style=”padding: 1px;” alt=”Add” >
When I did this the browser (in this case IE 6) stopped passing value of the submit button.
I have to jump through hoops to pass an action to the form handler.I had to create a hidden field, JS function, as well as replace <input> element with <button> element, to submit a form.
Is there anyway to pass the value of the <input> element without using JS ?
Thanks