get_value: function(node, ev)

hi,

im trying to get event details from edit form in firefox or chrome browser. it doesnt work but in ie it does.

[code]get_value: function(node, ev) {
alert(node.childNodes.length);

if(node.childNodes[4] != undefined)
{
ev.location = node.childNodes[4].value;
return node.childNodes[1].value;
}

            return false;              
        }, [/code]

when i try to use this in firefox it returns 0, in ie it returns the count of the elements.

this is the edit form

<div id="editor" style="display:none"> <div style="padding: 10px;"> Event <input id="event_name" type="text" style="font-size: 11px; width: 100%" /><br> event_details <textarea id="event_details" style="font-size: 11px; width: 100%" rows="4"></textarea><br> <br> xxxx <select name="xxx"></select>&nbsp;&nbsp;Dienstverband <select name="xxxx"></select></asp:Literal><br> <table border="0" cellpadding="2" cellspacing="2"> <tr> <td style="width: 180px"> <b>---</b> </td> <td style="width: 20px"> &nbsp; </td> <td style="width: 140px"> <b>--</b> </td> <td style="width: 20px"> &nbsp; </td> <td style="width: 140px"> <b>---</b> </td> </tr> <tr> <td> <select name="xxxy"></select> </td> <td> <input type="button" onclick="Add();" value=">" /><br> <input type="button" onclick="Remove();" value="<" /> </td> <td> <select name="xxxhh"></select> </td> <td> <input type="button" onclick="Add();" value="<" /><br> <input type="button" onclick="Remove();" value=">" /> </td> <td> <select name="xxxsx"></select> </td> </tr> </table> </div> </div>

any suggestion would be perfect.

IE and FF can count child nodes in different way ( because IE ignores empty text nodes ) , so to simplify logic, instead of direct indexes you can try to use

get_value: function(node, ev) { var selects = node.getElementsByTagName("select"); var inputs = node.getElementsByTagName("input"); //input[0] - first input in the form