allida77
04-02-2004, 05:31 PM
<input type="button" value="View" onClick="alert(this.getNextSibling)" />
<table ...>
......
I have a button which I am trying to toggle the display of a table. The ids are all dynamic so I am trying to use getNextSibling with no luck. The above alert returns an 'undefined'. I have fixed this by wrapping it all by a div and finding the parentNode but I was wondering why the above would not work.
<table ...>
......
I have a button which I am trying to toggle the display of a table. The ids are all dynamic so I am trying to use getNextSibling with no luck. The above alert returns an 'undefined'. I have fixed this by wrapping it all by a div and finding the parentNode but I was wondering why the above would not work.