...

View Full Version : Input Array problems - Gecko



Liquidus
11-15-2004, 07: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!

Liquidus
11-15-2004, 11:17 AM
NM I figured out a workaround! :thumbsup:

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum