Question:

Javascript - click() with Firefox?

by  |  earlier

0 LIKES UnLike

I have a table with data and an input form. When I find a value within range in the table, I want to click the action button (which is always the next element in the table).

This isn't working. Can anyone help?

var x=document.getElementsByTagName("td"); //grab all the table elements

for (i=0;i<40;i++){ //check each element

if (x[i]<200) {x[i+1].click();}; // if under 200, then take action

}

 Tags:

   Report

1 ANSWERS


  1. Far as I know .click() is IE proprietary... (not 100% certain)

    Assign an event to the action button and simply call the event when it finds the value you want action on...

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.