innerHTML overrides changes in value of input tag

They have: 1 posts

Joined: Feb 2010

The webpage in question is here: Link

The problem (only seen in Firefox. IE works fine):
Try creating a few variables. After doing so, THEN give them names and values. Proceed to then create a new variable. This brings the other variables's names and value back to the default. Does anyone have any idea why this happens? I read somewhere that other people have had similar problems. If you alert the value on the innerHTML before and after creating the new variable (but after assigning values to the previous ones), it is the same through and through.

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

kind of late here & really didn't look all that closely, but...javascript is an interpretive language.
if you insert alerts within your code after writing to your div, you should see that IE & FF handle page display differently...that is, one is interpreting the code on the fly while the other interprets an entire block before it displays the result.

Not sure, but if you assigned the innerHTML to a text var and then updated the div with it, you might end up with the same effect as IE.

Where the world once stood
the blades of grass cut me still

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.