Gossamer Forum
Home : General : Internet Technologies :

Untick a box ...

Quote Reply
Untick a box ...
Hi,

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;

this.test.value="..."

... 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

TIA

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Untick a box ... In reply to
Checkboxes don't have values - they are checked or unchecked.

Use:

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