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 (Michael J. Mahony)
- Subject: [Javascript] URGENT: Object required error in onClick event
- Date: Thu, 20 Jun 2002 07:53:25 -0700
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!
- Follow-Ups:
- [Javascript] URGENT: Object required error in onClick event
- From: Peter Brunone
- [Javascript] How do I retrieve values from custom attributes on a DIV?
- From: Walter Torres
- [Javascript] URGENT: Object required error in onClick event
- Prev by Date: [Javascript] Kill the history?????
- Next by Date: [Javascript] URGENT: Object required error in onClick event
- Previous by thread: [Javascript] Kill the history?????
- Next by thread: [Javascript] URGENT: Object required error in onClick event
- Index(es):