Yeah, that's a problem! I corrected it and now it comes out like: <html> <head> <title> Independent Fact Finders Inc. </title> <meta name="description" content="Independent Fact Finders Inc."> <META name="keywords" content="Legal, background checks, background, check, records, paralegal, lawyer, attorney"> <meta name="allow-search" content="yes"> <meta name="audience" content="all"> <meta name="robots" content="all, index, follow"> <meta name="revisit-after" content="14 days"> <meta name="Rating" content="General"> <meta name="Language" content="en"> <meta name="distribution" content="Global"> <meta name="Classification" content="Legal"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="iffinet.css" type="text/css" /> <script language="JavaScript"> function CheckBox1() { var box1 = window.document.ctype.wr; var box2 = window.document.ctype.pfo; var box3 = window.document.ctype.pr; if (box1.checked == true ) { box2.checked = false; box3.checked = false; } } function CheckBox2() { var box1 = window.document.ctype.wr; var box2 = window.document.ctype.pfo; var box3 = window.document.ctype.pr; if (box2.checked == true ) { box1.checked = false; box3.checked = false;} } } function CheckBox3() { var box1 = window.document.ctype.wr; var box2 = window.document.ctype.pfo; var box3 = window.document.ctype.pr; if (box3.checked == true ) { box1.checked = false; box2.checked = false; } } </script> </head> <body TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> But the script I call from onClick="return CheckBox2()" from a checkbox does not execute. Is there something in the header info keeping JS from running? I'm stumped. /T on 6/24/03 9:04, Chris Hayes at [EMAIL PROTECTED] wrote: > > I missed the 1st post but could this be related to form name being 'crimetype' > and the javascript tryin to access the form 'ctype' ? > > > At 15:55 24-6-03, you wrote: >> i think you have to add "\n" after each row of java script code. >> .... $js .= "}\n"; > afaik the ; handles that but indeed i would let the functions start at the > beginning of a new line. > > >> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> schrieb im Newsbeitrag >> news:[EMAIL PROTECTED] >> How can I get a script to work on a page that has HTML generated by PHP and >> a javascript with functions called by an checkbox? >> <script>function CheckBox1(){var box1 = window.document.ctype.wr;var box2 = >> window.document.ctype.pfo;var box3 = window.document.ctype.pr;if >> (box1.checked == true ) {box2.checked = false;box3.checked = >> false;}} > [....] >> <form name="crimetype" method="post" action=""> >> <input type="checkbox" name="WR" value="1" onClick="return CheckBox1();"> >> <input type="checkbox" name="PFO" value="2" onClick="return CheckBox2();"> >> <input type="checkbox" name="PR" value="3" onClick="return >> CheckBox3();"></form></td> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php