Problem solved
I discovered the cause of the problem. My Select box had no ID, but its Name was the same as the ID of the Hidden Field. Careless coding on my part.
Firefox and IE handle the situation differently. IE was allowing the Javascript "getElementById " to change the value of the select box even though it didn't have an ID attribute. Then it did not change the value of the following hidden field because...
User Profile
Collapse
-
Thank you for your response! Following the direction you suggest, I have checked as to how the variable is being assigned to the hidden field. I discovered that the variable is being passed to the function as a string. This does not bother Firefox, but maybe IE cannot handle it.
...Code:function chooseList(x) { alert(typeof(x)); x= parseInt(x); alert(typeof(x)); document.getElementById('myHiddenField').value=x;Leave a comment:
-
JS changes hidden value, IE predicts future
Two years ago, member acoder gave patient help to a newbie whose function worked in IE but not in Firefox. I have a similar problem, but mine works fine in Firefox and exhibits astonishing behavior in IE.
...Code:function chooseList(x) { alert(document.getElementById('myHiddenField').value); document.getElementById('myHiddenField').value=x; alert(document.getElementById('myHiddenField').value);
No activity results to display
Show More
Leave a comment: