Hello All,
I want to call a javascript function on the click of a link ..if I use teh following I get an error saying that this.parentNode is not defined..
But if I use the following approah it works fine can anyone please point out whats that I am doing wrong.
I want to use the former approach becuase I dont want to loose the focus when the link is clicked, when you use the later approach it somehow looses teh focus to the beginning of teh page and I am using IE..
I want to call a javascript function on the click of a link ..if I use teh following I get an error saying that this.parentNode is not defined..
Code:
<a href="javascript:return toggle(this.parentNode.parentNode,this.firstChild,'button_collapse.gif','button_expand.gif');"><img src="button_collapse.gif" width="5" height="9" border="0" /> <b>External</b></a> </th></tr>
But if I use the following approah it works fine can anyone please point out whats that I am doing wrong.
Code:
<a href="#" onclick="javascript:toggle(this.parentNode.parentNode,this.firstChild,'button_collapse.gif','button_expand.gif');"><img src="button_collapse.gif" width="5" height="9" border="0" /> <b>External</b></a> </th></tr>
I want to use the former approach becuase I dont want to loose the focus when the link is clicked, when you use the later approach it somehow looses teh focus to the beginning of teh page and I am using IE..