image button can't be called???

H

haiwen

Hello, every one:

I meet a strange problem:

I have a normal button(butNext) and an image button
(imgButNext). after them, I have client script to triger
the buttons. I use:
document.Form1.butNext.click(); this work well, but
document.Form1.imgButNext.click(); doesn't work anyway.

Is there any difference to triger the normal button and
image button and could some one tell me how to triger the
image button from client script.

Thanks a lot.


Haiwen
 
V

Vidar Petursson

Hi

This should work on most newer browsers....

var e = document.getElementById("ImgBtnID");
if(e != null ) e.click();

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top