Using Imagebuttons to submit a form

M

Martin

Hi,
I want to use Imagebuttons () to submit a form, as following:
<form ....>
<Input name="buttonEdit" type=Image onclick="ActionHandle("2")>
<Input name="buttonnew" type=Image onclick="ActionHandle("1")>

</form>

But when I click a button, the function ActionHandle is not call.
I want to know, which button the user click, to open the corresponding form
and record

Where is incorrect, what can I do?
Thanks
Martin
 
M

McKirahan

Martin said:
Hi,
I want to use Imagebuttons () to submit a form, as following:
<form ....>
<Input name="buttonEdit" type=Image onclick="ActionHandle("2")>
<Input name="buttonnew" type=Image onclick="ActionHandle("1")>

</form>

But when I click a button, the function ActionHandle is not call.
I want to know, which button the user click, to open the corresponding form
and record

Where is incorrect, what can I do?
Thanks
Martin

An image button acts like a submit button:

<form .... onsubmit="return ActionHandle()">
<input name="buttonSubmit" type="image.gif">
</form>

Or just use:

<img src="buttonEdit.gif" onclick="ActionHandle(2)">
<img src="buttonNewt.gif" onclick="ActionHandle(1)">

You should also include:
border=
width=
height=
alt=
 
G

Giles

Martin said:
I want to use Imagebuttons () to submit a form, as following:
<form ....>
<Input name="buttonEdit" type=Image onclick="ActionHandle("2")>
<Input name="buttonnew" type=Image onclick="ActionHandle("1")>

</form>

But when I click a button, the function ActionHandle is not call.

Also, more fundamentally, your syntax is wrong
onclick="ActionHandle('2')"

Giles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,149
Messages
2,570,842
Members
47,388
Latest member
EarthaGilm

Latest Threads

Top