Open-AudIT https://www.open-audit.org/phpBB3/ |
|
[fixed] javascript error on index.php https://www.open-audit.org/phpBB3/viewtopic.php?f=8&t=1020 |
Page 1 of 1 |
Author: | Shredder [ Tue Jul 25, 2006 1:48 am ] |
Post subject: | [fixed] javascript error on index.php |
Line:113 Char: 10 Error: '$jscript_count' is undefined Code: 0 Url: index.php I'm not very good in jscript, but I can't find $jscript_count in index.php |
Author: | aconbere [ Tue Jul 25, 2006 5:40 am ] |
Post subject: | |
Eh, mark you comment js with /* */ not <!-- --> <script type="text/javascript"> 106<!-- 107 function switchUl(id){ 108 if(document.getElementById){ 109 a=document.getElementById(id); 110 a.style.display=(a.style.display!="none")?"none":"block"; 111 } 112 } 113 for(i=0;i<$jscript_count;i++) //number of folders HERE 114{ 115 switchDIV('f'+i); 116 } 117// --> 118</SCRIPT> This is pretty weird just in general given that a) $ is the php variable identifier (javascript has none). b) it's improperly commented c) $jscript_count is used in includes.php. Not sure what's really up here, but I imagine it should just be properly commented and the problem will dissappear. However while we're here that closing tag is in caps (bad!) ~ Anders |
Author: | Mark [ Tue Jul 25, 2006 9:14 am ] |
Post subject: | |
The javascript is not meant to be commented out with /* */. I have used <!-- to hide it from non-compliant browsers. $jscript_count is a PHP variable, and is defined on line 9. I hadn't inserted the <?php stuff to print out $jscript_count to the javascript routine. Have done so now. Basically, PHP tracks how many secitons there are on the index.php page, using a count in $jscript_count. It then provides this to the javascript function switchUl, so you don't get "error on page" for having an incorrect number of secitons. That way, you can turn sections on and off, with oput worrying about the count all the time... Fixed. |
Author: | scaixeta [ Thu Aug 03, 2006 1:02 am ] |
Post subject: | |
i don´t understand. .... ;^( |
Author: | imacs [ Thu Aug 03, 2006 1:05 am ] |
Post subject: | |
scaixeta...no worries this issue was fixed a while back in an SVN |
Author: | scaixeta [ Sat Aug 19, 2006 3:03 am ] |
Post subject: | |
Yep! |
Page 1 of 1 | All times are UTC + 10 hours |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |