Welcome to WebmasterWorld Guest from 54.234.38.8

Forum Moderators: open

Message Too Old, No Replies

Form Image no submit?

     
4:20 am on Sep 2, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 2, 2004
posts:187
votes: 0


How do you get an image in a form to respond to a mouseclick and NOT Submit? I don't want it to do anything but the AJAX stuff.

<Form id="DTF" onSubmit="GetN(this.form.id);return false;">
<INPUT Type="image" id="DT" value="DT=123" src="/images/MenuItemButton.php?AnyText=123" width="64" height="64" onclick="GetN(this.form.id);return false;"></form>

Thanks AGAIN!
M

7:35 am on Sept 2, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 3, 2005
posts:1585
votes: 0


Replace

<INPUT Type="image" id="DT" value="DT=123" src="/images/MenuItemButton.php?AnyText=123" width="64" height="64" onclick="GetN(this.form.id);return false;">

with

<img src="/images/MenuItemButton.php?AnyText=123" width="64" height="64" onclick="GetN('DT');" />

maybe, is there a need to enclose it withim a form?

11:47 am on Sept 2, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 2, 2004
posts:187
votes: 0


Yes, I am using other form items in the AJAX POST