Using your code I can put a blank in your weight field and the checkbox will
get checked.
----- Original Message -----
From: "Madòrick" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, August 02, 2005 10:00 PM
Subject: Re: [ASP] Updating a CHECKBOX when a value is entered in a FORM
> Thanks everyone, I got this working. It's pretty slick. This is to
> prevent entry errors. Here is what I got working:
>
>
> <SCRIPT language="JavaScript" type="text/JavaScript">
> function checkWeight (WeightID, StarID)
> {
>
> var Weight = document.getElementById(WeightID);
> var Star = document.getElementById(StarID);
>
> Star.checked = true;
>
> }
> </SCRIPT>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> <TD><CENTER>
> <INPUT name="Weight1" type="text"
> id="Weight1" size="5" maxlength="3" onChange='checkWeight
> ("Weight1", "Star1")'>
> </CENTER></TD>
> <TD><CENTER>
> <INPUT type="checkbox" id="Star1"
> name="Star1" value="True" disabled>
> </CENTER></TD>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Thanks again for all the help.. I hope I can contribute more in the
> future, as I get better at this.. I save all of the posts and glean
> off the important stuff to a "Tip's Notebook" document. I have
> found some things to be very helpfull....
>
>
>
> --- In [email protected], "Dan Powderhill"
> <[EMAIL PROTECTED]> wrote:
>> I can't say I've tried passing getElementById an unquoted
> parameter. If it wasn't quoted then by the nature of Javascript it'd
> need to be a variable, constant or function name, whereas the ID in
> this case is a string attribute value.
>>
>> All the references I can find suggest that it takes a string as a
> parameter, and therefore needs to be quoted.
>>
>>
> http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/get
> elementbyid.asp
>>
>> http://www.mozilla.org/docs/dom/domref/dom_doc_ref48.html
>>
>> Dan
>>
>> -----Original Message-----
>> From: [email protected] [mailto:active-server-
> [EMAIL PROTECTED] On Behalf Of David Smart
>> Sent: 02 August 2005 14:07
>> To: [email protected]
>> Subject: Re: [ASP] Updating a CHECKBOX when a value is entered in
> a FORM
>>
>> No you don't.
>>
>> Dave S
>>
>> ----- Original Message -----
>> From: Dan Powderhill
>> To: [email protected]
>> Sent: Tuesday, August 02, 2005 6:06 PM
>> Subject: RE: [ASP] Updating a CHECKBOX when a value is entered
> in a FORM
>>
>>
>> You need quotes around WeightID and StarID.
>>
>> Dan
>>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Home : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post : [email protected]
> Subscribe : [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12h4g399u/M=362131.6882499.7825260.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1123076979/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [email protected]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/