Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Mar 29, 2024 7:54 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
PostPosted: Tue Jul 25, 2006 1:48 am 
Offline
Newbie

Joined: Fri May 05, 2006 3:55 am
Posts: 11
Location: Montreal, Canada
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 :?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 5:40 am 
Offline
Moderator

Joined: Wed Apr 26, 2006 3:20 am
Posts: 119
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Jul 25, 2006 9:14 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 1:02 am 
Offline
Newbie

Joined: Tue May 24, 2005 2:58 am
Posts: 14
i don´t understand.

.... ;^(


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 03, 2006 1:05 am 
Offline
Contributor

Joined: Thu Jul 13, 2006 7:54 am
Posts: 156
scaixeta...no worries this issue was fixed a while back in an SVN :-)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 19, 2006 3:03 am 
Offline
Newbie

Joined: Tue May 24, 2005 2:58 am
Posts: 14
Yep!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group