If the input element has an ID and it is duplicate with another element, it’s likely cause an error. In this case, Firefox 3.5 and IE8 on Windows Vista has no problem while same browsers in Windows XP does not work.
Problem
…
$(“#myform #action”).val();
That works in Vista and Mac OSX but not XP. It’s rather weird it’s a problem that depends on the OS and not the browser. Anyway, it’s a mistake and duplicate IDs should always be avoid.
Solution
…
$(“#myform input[name=’action’]”).val();
Leave a Reply