OK - I just found the answer at IRT.ORG - if you haven't checked that site
out, you're missin' out!

Thanks,
Dave



----- Original Message -----
From: "Dave Hannum" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, July 28, 2000 9:07 AM
Subject: (OT) JS Image for Button vs. FORM Button


The crew on the JS-Jive list helped me with a script that clears radio
buttons on a form.  I'm trying to use an image for the clear button, but it
seems to kill the script.  Would anyone know if it's a JS or HTML querk?
Can I use an image to activate a JS on the page?  Below is the code followed
by the tag for the image button.

TIA,
Dave

==============================
<script language="JavaScript">
function uncheck()
{
  form = document.forms[0];
  for(i = 0; i < form.elements.length; i++)
  {
    if(form.elements[i].type == 'radio')
    {
      if(!form.elements[i].length)
      {
  if(form.elements[i].name != 'Name')
  {
    form.elements[i].checked = false;
  }
      }
      else
      {
         for(j = 0; j < form.elements[i].length; j++)
         {
   if(form.elements[i].name != 'Name')
   {
    form.elements[i][j].checked = false;
   }
         }
      }
    }
  }
}

</script>

<INPUT TYPE="Image" NAME="Button"
SRC="/cgi-cf/adminsys/classlist/images/new-clear.gif" ALT="Clear Form"
BORDER=0 onClick="uncheck()">




=================================
"What we need is a list of specific unknown problems we will encounter"

David Hannum
Web Analyst/Programmer
Ohio University
[EMAIL PROTECTED]
(740) 597-2524




----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to