SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2006
    0 Post(s)
    0 Thread(s)

    How to uncheck a checkbox

    I am sure this must a very old question, but I cannot find the answer. I have a form where I want the address box to appear if the user ticks the checkbox called "Please send a catalogue". The form is at

    The relevant code has the comment immediately above it <!--Please send catalogue-->

    The checkbox has onclick="toggleDisplay('address'); which works nicely. The Javascript function is near the top of the page.

    Near the bottom of the page is = 'none'; which makes the address box invisible to start with.

    My problem starts if the user clicks Refresh. The address box disappears once more but the checkbox stays checked. This is overcome by adding at the bottom catalogue.checked = ''; so that the checkbox is set back to unchecked on refreshing. Catalogue is the name of the checkbox. This works in Firefox, Opera and Netscape, BUT not in IE7, which says that there is an error: catalogue is undefined.

    Can someone suggest to me how to get Internet Explorer to do the same as the others please?
    Last edited by Pelias; May 17, 2007 at 02:49. Reason: No replies yet!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts