View Full Version : Input Array problems - Gecko

11-15-2004, 08:51 AM
I've written a script to order news post made by a php script. Each news post is a div with the title, some options etc, in it and a hidden field, containing the post's id. All hidden fields together form an array named "order" (<input type="hidden" name ="order[]" value="POST_ID" />)

I use the DOM (notably removeChild and insertBefore) to move the div's and their content around on the page. The idea was that upon posting, the "order" array would resemble the visually ordered list. From there on I could change the order of the news posts serverside.

This works nicely in IE, but in Gecko browsers however, it does not! Every time I move a div, visually it works, but the relevant "order" entry is moved to the end of the array! Is there anything I can do about this? I'd like the script to be crossbrowser compatible!

11-15-2004, 12:17 PM
NM I figured out a workaround! :thumbsup:

11-17-2004, 12:34 PM
IE and Moz have different approaches about the childNodes length (Moz consider textNode as a childeNode even if it is empty).