...

using getNextSibling in ie

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.

liorean
04-02-2004, 06:01 PM
If you change that to [object Element].nextSibling you'll probably find it working better.

allida77
04-02-2004, 07:03 PM
much better...Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum