Hi,
I am trying to invoke a onClick event on a checkbox.
<form id=”Form1″ method=”post” runat=”server”>
<H4 class=”outline”>
<INPUT id=”inputChk” name=”checkName” type=”checkbox” [B]onclick[B]expandIt[/B
Time now for business with Collately Sisters</H4>
<DIV class=”hiddentext” id=”el1″>
<P>No let-up today for British manufacturers, there were large profit slumps for
Securivadge and United Haha. Down 6.4, Joanny Collins perhaps units on a lower
third rung. There was better news for Edgyledgywedgebarge, who mustered 2.41 up
88 very slightly [she smiles wryly for no reason], but Oxymacgee flew back a
ninth, despite a creeping bid from Connected Breathdumps at four.</P>
</DIV>
<H4 class=”outline” onclick=”expandIt(el2); return false”>Sylvester Stuart has
today’s weather</H4>
<DIV class=”hiddentext” id=”el2″>
<P>Starting in the southeast, where it’ll be misty tomorrow with a droplet density
of about 50,000 per spherical inch. That’s rather as if the mist were hugging
the ground like an over-affectionate and rather damp dog. Over to East Anglia
and the Midlands, there’ll be a warm day tomorrow, about 20, that’s the sort of
warmth you might feel on a January morning walking into a heated drawing room
after chopping some wood. And finally, into the north of England and Scotland –
a strong and highly long-lasting day tomorrow, with hail aimed down vertically
from above, and there’ll be a 30% chance. In summary then – breezes. And that’s
all the weather.
</P>
</DIV>
</form>
and this is the expandIt javascript function which is triggered on checkbox click.
<SCRIPT language=”JavaScript” type=”text/javascript”>
<!– // hide from old browsers
// hide text from MSIE browsers
with (document)
{
write(“<STYLE TYPE=’text/css’>”);
if (navigator.appName == ‘Microsoft Internet Explorer’)
{
write(“.hiddentext {display:block} .outline {cursor:hand; text-decoration:underline}”);
}
write(“</STYLE>”);
}
// show text on click for MSIE browsers
function [B]expandIt[/B](whichEl)
{
//if (navigator.appName == ‘Microsoft Internet Explorer’)
// {
whichEl.style.display = (whichEl.style.display == “block” ) ? “none” : “block”;
// }
//else return;
}
// end hiding from old browsers –>
</SCRIPT>
My problem is though the event gets fired the checkbox remains unchecked. The control’s property(disabled has been set to false). Can anybody help me regarding this,please???