Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] URGENT: Object required error in onClick event
- From: javascript@xxxxxxxxxx (Muchacho, Laurent (TWIi London))
- Subject: [Javascript] URGENT: Object required error in onClick event
- Date: Thu, 20 Jun 2002 16:12:36 +0100
Hi I see an other thing you should write document.orderoptions instead of document.forms.orderoptions that will make your life a bit easier and Peter was right for the integer you can't use integer directly like at list put one charater in front Laurent -----Original Message----- From: Peter Brunone [mailto:peter@xxxxxxxxxxx] Sent: 20 June 2002 16:06 To: javascript@xxxxxxxxxx Subject: RE: [Javascript] URGENT: Object required error in onClick event Michael, Are you sure the problem isn't a misspelled form name or the fact that you're using integers to identify objects? -Peter |-----Original Message----- |From: javascript-admin@xxxxxxxxxx [mailto:javascript-admin@xxxxxxxxxx]On |Behalf Of Michael J. Mahony |Sent: Thursday, June 20, 2002 9:53 AM |To: javascript@xxxxxxxxxx |Subject: [Javascript] URGENT: Object required error in onClick event | | |Hi, | |I'm getting frustrated by this code and thought I would ask for some |help. | |I've got a simple onClick handler in my code. However, when I click the |item I want to fire off the onClick handler I'm told that an object is |required. It basically just does not see the function I've designed to |handle the onClick event. Here is the relevant portion of the HTML |code: | |<td><input type="checkbox" value="0.99-11229" name="3168" |onClick="clicked11229();">Add Kid's Shake<i>(add |0.99)</i></td></tr><tr><td> </td><td> |<input |type="checkbox" value="0.00-11230" name="3169">Vanilla<i>(add |0.00)</i></td></tr><tr><td> </td><td> |<input |type="checkbox" value="0.00-11231" name="3169">Chocolate<i>(add |0.00)</i></td></tr><tr><td> </td><td> |<input |type="checkbox" value="0.00-11232" name="3169">Strawberry<i>(add |0.00)</i></td> | | |And here is the relevant JavaScript code: | |<script language="javascript 1.0"> |<!-- | |function clicked11229() |{ |if(document.forms.orderoptions.3168.checked!=true) |{ |alert('Got here'); |document.forms.orderoptions.3169[0].checked=false; |document.forms.orderoptions.3169[1].checked=false; |document.forms.orderoptions.3169[2].checked=false; |} |} | |//--> |</script> | |I've also tried modifying this as follows: | |<script language="javascript 1.0"> |<!-- | |function clicked11229() |{ |if(document.orderoptions.3168.checked!=true) |{ |alert('Got here'); |document.orderoptions.3169[0].checked=false; |document.orderoptions.3169[1].checked=false; |document.orderoptions.3169[2].checked=false; |} |} | |//--> |</script> | |but it still fails. | |What am I doing wrong? | |Thanks! |_______________________________________________ |Javascript mailing list |Javascript@xxxxxxxxxx |https://lists.LaTech.edu/mailman/listinfo/javascript | _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript DISCLAIMER - The preceding e-mail message (including any attachments) contains information that may be confidential, may be protected by the attorney-client or other applicable privileges, or may constitute non-public information. It is intended to be conveyed only to the designated recipient(s) named above. If you are not an intended recipient of this message, or have otherwise received it in error, please notify the sender by replying to this message and then delete all copies of it from your computer system. Any use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. The contents of this communication do not necessarily represent the views of this company.
- Follow-Ups:
- [Javascript] URGENT: Object required error in onClick event
- From: Michael J. Mahony
- [Javascript] URGENT: Object required error in onClick event
- Prev by Date: [Javascript] URGENT: Object required error in onClick event
- Next by Date: [Javascript] Set objWord = CreateObject("Word.Application") CAN i do this i n javascript???
- Previous by thread: [Javascript] How do I retrieve values from custom attributes on a DIV?
- Next by thread: [Javascript] URGENT: Object required error in onClick event
- Index(es):