Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 900225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:21:01+00:00 2026-05-15T15:21:01+00:00

This a pretty simple question (I assume). Probably a repost, but I couldn’t find

  • 0

This a pretty simple question (I assume). Probably a repost, but I couldn’t find the answer here… so here we go.

I have a checkbox on a page that I want to default to “unchecked” (unless I specify otherwise in my php).

When I refresh the page, if the box was checked, it will stay checked which is no-bueno because checking the box adds a dom element to my page via a function attached to the box. So the problem is if I refresh, the box is still checked, but the dom element doesn’t exist (because I haven’t fired the function and I don’t want to unless the user checks the check box) but the box is ALREADY checked and I end up in opposite land where UN checking the box creates my dom element and checking it removes it.

Basically, the question is…

Is there a way to default a checkbox to unchecked without javascript?

BTW I haven’t checked (no pun intended) in any browsers other than FF 3.5.10

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:21:02+00:00Added an answer on May 15, 2026 at 3:21 pm

    See http://weblogs.mozillazine.org/gerv/archives/2006/10/firefox_reload_behaviour.html
    (first comment):

    It’s done that way on purpose so if you tap the refresh button you
    don’t lose your work. There’s an entry in Bugzilla somewhere that’s
    been WONTFIXed asking for a regular refresh to always reset the form
    entirely. Basically it’s a backwards-compatibility thing — every
    browser since NS1.0 (maybe even Mosiac) has done that.

    Dynamically-generated pages don’t even reset themselves, though if the
    expiration is set to 0 and you hit the back button it will give you a
    fresh form. Also, if the form itself changes (add or remove elements,
    change the action, etc.) the for will reset on a reload. I haven’t
    tested it, but setting the form name to something random (assuming you
    don’t need the name for JS access) might just work. Like ”> in PHP.

    As you said, forcing a refresh clears the form, and resetting it does
    too. Would something like do
    what you want (again, not tested)?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pretty sure this is a simple question in regards to formatting but here's
So this seems pretty basic but I can't get it to work. I have
This is a pretty-much theoretical question, but.. How much of an operating system could
This is a pretty simple django patterns question. My manager code usually lives in
This is pretty simple, I come from a swing/awt background. I'm just wondering what
This is pretty weird. I have my Profiler open and it obviously shows that
This is pretty trivial, but I noticed on SO that instead of an offset
I thought this was pretty straight forward but I don't get the same results
I think this is pretty typical, you have the same website project with an
This pretty much has me defeated. On XP and earlier versions of Windows you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.