User Profile

Collapse

Profile Sidebar

Collapse
FrankF
FrankF
Last Activity: Apr 15 '09, 04:01 PM
Joined: Apr 11 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 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...
    See more | Go to post

    Leave a comment:


  • 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;
    ...
    See more | Go to post

    Leave a comment:


  • FrankF
    started a topic JS changes hidden value, IE predicts future

    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);
    ...
    See more | Go to post
    Last edited by Dormilich; Apr 11 '09, 07:23 PM. Reason: managed to hook up the code tags
No activity results to display
Show More
Working...