Iskanje po podpori

Izogibajte se prevarantski tehnični podpori. Nikoli vam ne bomo naročili, da pokličete telefonsko številko ali nam pošljete osebne podatke. Sumljivo dejavnost prijavite z gumbom »Prijavi zlorabo«.

Več o tem

Reload page doesn't reset Javascript checkbox to "off"

  • 3 odgovori
  • 5 ima to težavo
  • 598 ogledov
  • Zadnji odgovor od cor-el

more options

I posted this problem back in March regarding FF 3.6.14. I've now upgraded to 4.0.1 and the problem still hasn't been fixed! I can't imagine this isn't a problem for other commercial websites, so I'm at a loss to understand why it hasn't been fixed yet. Here is the description I gave before, which hasn't changed:

I've been creating a new web page and have "onload" in the body tag, which resets all checkboxes in a form. It was working fine when I reloaded the page, while I was using Firefox 3.6.13. But then I updated to Firefox 3.6.14 yesterday or the day before, and suddenly it's not working. Other instructions in the javascript are working (resetting the color of boxes in the form) but it won't reset checkboxes to be unchecked. I have a reset button that calls the same script and it works find; it's just when I reload the page that it doesn't work. It does still work in IE8, though.

I posted this problem back in March regarding FF 3.6.14. I've now upgraded to 4.0.1 and the problem still hasn't been fixed! I can't imagine this isn't a problem for other commercial websites, so I'm at a loss to understand why it hasn't been fixed yet. Here is the description I gave before, which hasn't changed: I've been creating a new web page and have "onload" in the body tag, which resets all checkboxes in a form. It was working fine when I reloaded the page, while I was using Firefox 3.6.13. But then I updated to Firefox 3.6.14 yesterday or the day before, and suddenly it's not working. Other instructions in the javascript are working (resetting the color of boxes in the form) but it won't reset checkboxes to be unchecked. I have a reset button that calls the same script and it works find; it's just when I reload the page that it doesn't work. It does still work in IE8, though.

Vsi odgovori (3)

more options

Firefox is very aggressive about caching, so I'm surprised it worked before. This article may help in coding around that: https://developer.mozilla.org/en/using_firefox_1.5_caching (check out the Sample Code section)

more options

Thanks jscher2000. I'll check it out and see if I can get it to work. I'll report back one way or the other (but probably won't be immediately).

more options

You need to bypass the cache to reset forms.

Reload web page(s) and bypass the cache.

  • Press and hold Shift and left-click the Reload button.
  • Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
  • Press "Cmd + Shift + R" (MAC)