Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations danielledunham on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

attachEvent Problem

Status
Not open for further replies.

pigpig504

Programmer
Joined
Sep 8, 2003
Messages
11
Location
HK
Dear all,

I would like to attach a onclick event to a table row as follows:

oRow[row_index].attachEvent("onclick", doSelect);

however, for the function doSelect, I would like to pass 2 arguments when attaching. How can I do that??

any alternative method??

Thx a lot!
 
try set attribute:
oRow[row_index].setAttribute("onclick", "doSelect(Param1,Param2)");


Known is handfull, Unknown is worldfull
 
I tried to use
oRow[row_index].setAttribute("onclick", "doSelect(Param1,Param2)");
but when I click on this row function doSelect never happened
What is wrong ?
 
See thread216-904929

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top