click() method and Firefox

A

Aziz

hi,

with the following anchor objeck: <a id="ref" href.......>...</a>
this code:
document.getElementById("ref").click();
works on IE 6 but not on Firefox 1.0
the error message is: document.getElementById("ref").click is not a
function..
I'll be happy if you could tell me why and how to solve?

Thanks
 
L

Lee

Aziz said:
hi,

with the following anchor objeck: <a id="ref" href.......>...</a>
this code:
document.getElementById("ref").click();
works on IE 6 but not on Firefox 1.0
the error message is: document.getElementById("ref").click is not a
function..
I'll be happy if you could tell me why and how to solve?

Instead, use this code:

location="whatever the href value of that link happens to be";
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top