Make them regular images.....

Mark Stephenson
New Media Director
Evolution Internet
T: 0870 757 1631
F: 0870 757 1632
W: www.evolutioninternet.co.uk
E: [EMAIL PROTECTED]


WARNING:
-------------------------------
The information contained in this document and attachments is confidential
and intended only for the person(s) named above.  If you are not the
intended recipient you are hereby notified that any disclosure, copying,
distribution, or any other use of the information is strictly prohibited.
If you have received this document by mistake, please notify the sender
immediately and destroy this document and attachments without making any
copy of any kind.

AVIS IMPORTANT:
-------------------------------
Les informations contenues dans le present document et ses pieces jointes
sont strictement confidentielles et reservees a l'usage de la (des)
personne(s) a qui il est adresse. Si vous n'etes pas le destinataire, soyez
avise que toute divulgation, distribution, copie, ou autre utilisation de
ces informations est strictement prohibee.  Si vous avez recu ce document
par erreur, veuillez s'il vous plait communiquer immediatement avec
l'expediteur et detruire ce document sans en faire de copie sous quelque
forme.




-----Original Message-----
From: Deanna Schneider [mailto:deanna.schneider@;ces.uwex.edu]
Sent: 23 October 2002 18:47
To: CF-Talk
Subject: OT: Javascript ?


Hi Folks,
With the following code, I can check or uncheck all the checkboxes on a page
IF I use an input type of button. If I use an input type of image, the page
submits. What gives? (Two different style of looping because of messing
around with it only.)

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function checkAll() {
 var el = document.forms[0].elements;
 for(var i = 0 ; i < el.length ; ++i) {
  if(el[i].type == "checkbox") {
   el[i].checked = true;
 }
 }
}
function unCheckAll() {
var i=0;
for( i=0 ; i<document.forms[0].elements.length; i++) {
document.forms[0].elements[i].checked=0;
}
}
//  End -->
</script>

These submit the form:
<input type="image" src="images/check.gif" onClick="checkAll();" alt="Check
All"> <input type="image" src="images/uncheck.gif" onClick="unCheckAll();"
alt="UnCheck All">

These don't
<input type="button" value="Check All" onClick="checkAll();"> <input
type="button" value="UnCheck All" onClick="unCheckAll();">


Deanna Schneider
Interactive Media Developer
[EMAIL PROTECTED]




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to