Gossamer Forum
Home : General : Internet Technologies :

Untick a box ...

Quote Reply
Untick a box ...

I'm getting there with this JS stuff ... but I'm a little confused as to one thing. Basically, in my perl script... I'm outputting a list of entries, which a tick-box next to them. Now, if a special value exists in this entry (i.e they have been paid), it shows with a red border, and also gives them a message when ticking. It all works well ... but one thing I would really like to do, is actually stop it being ticked in the first place. The code is;

<input type="checkbox" name="pay" value="5" style="border:1px solid #FF0000; color: #FF0000; font-family: Tahoma" onClick="javascript: alert('This payment has already been made!')">

I thought maybe I could do it with;


... but that gives an error. I can't for the life of me, find a decent tutorial, which suggest's how to use this ... so any advice is much appreciated Smile


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Untick a box ... In reply to
Checkboxes don't have values - they are checked or unchecked.


this.checked = false;

A Google search for "javascript checkbox" would probably bring up plenty of tutorials.

Last edited by:

TypeR: Jan 24, 2005, 10:30 AM