Total members 11889 |It is currently Thu Mar 28, 2024 11:46 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





CALLER
Code:
function showContent(s,i){
   // loading
   //loading_img(1);
   //s = s.toString();
   
   // i undefined
   if(i==undefined){
      i="";
   }
   
   if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
   }else{// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   
   xmlhttp.onreadystatechange=function(){
      if (xmlhttp.readyState==4 && xmlhttp.status==200){
         //alert('s'+s);
         document.getElementById('s'+s).innerHTML=xmlhttp.responseText;
         
         if(s==0||s==1||s==4||s==7||s==8||s==9){
            var v="js"+s;
            if(document.getElementById(v)){
               eval(document.getElementById(v).innerHTML); // THIS IS THE LINE WITH ERROR
            }else{
               alert('e')
            }
         }
         
         // open next one
         if(s<aS.length-1){
            showContent(s+1);
         }else{
            // render #anchors
            Scroller.init();
            
            // get final doc height
            doc_h = getDocHeight();
         }
         
         // adjust layout
         adjustLayout();
         
         // loading animation
         // OFF
         aS[s][0] = 1;
         
         
         //align();
      }
   }
   
   xmlhttp.open("GET",s+".asp?i="+i,true);
   xmlhttp.send();
}



CODE BEING LOADED:

Code:
<script language="javascript" id="js0">
<!--

// vars
oGaleriaSsImage = new Image();
lGaleriaSs = 1;
iGaleriaSs = null;
bGaleriaSs = null;

aGaleriaSs = new Array();
<%
   ' Randomizer
   Dim max,min
   Dim aImgs()
   max=4
   min=0

   Set AA = CX.Execute(" Select imagem from 11_arquivos order by ordem DESC")
   c=0
   do while not AA.EoF
      ReDim Preserve aImgs(c+1)
      aImgs(c) = AA.Fields(0)
      AA.MoveNext
      c=c+1
   Loop
   
   max=UBound(aImgs)-1
   
   c=0
   do while c<5
      Randomize
      r = Cstr(Int((max-min+1)*Rnd+min))

      img = aImgs(r)
      
      if c=0 then
         imagem = img
      end if
%>
// Array imgs
aGaleriaSs[<%=c%>] = '<%=img%>';
<%      
      c=c+1
   Loop
   
%>

//nextImgSs('GaleriaSs',0,'ss');

//-->
</script>



I'm getting syntax error on that line there. But it all works fine on Chrome & FF.

Could somebody help me, please?




Author:

Code:

 
eval(document.getElementById(v).innerHTML); // THIS IS THE LINE WITH ERROR
 


You can use alert function to print the value of (v) to check what is the actual bug >?

_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

<!--
// vars

oGaleriaSsImage = new Image();

lGaleriaSs = 1;

iGaleriaSs = null;

bGaleriaSs = null;

aGaleriaSs = new Array();

// Array imgs

aGaleriaSs[0] = '1329337516DSC_2874_OK.jpg';

// Array imgs

aGaleriaSs[1] = '1329337531DSC_2897_OK.jpg';

// Array imgs

aGaleriaSs[2] = '1328723582DSC08840_OK.jpg';



// Array imgs

aGaleriaSs[3] = '1329337499DSC_2829_OK.jpg';

// Array imgs

aGaleriaSs[4] = '1329337531DSC_2897_OK.jpg';

//nextImgSs('GaleriaSs',0,'ss');

//-->


Author:
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : AJAX SYNTAX ERROR IE
 Error handling in AJAX     -  
 Solution to Error status zero when using Ajax with JQuery     -  
 PHP Syntax     -  
 syntax of the session_start () in php     -  
 java Collection Syntax     -  
 compiler code of syntax analyzer in C++     -  
 correct syntax for access providers in java     -  
 What is AJAX, How to start AJAX?     -  
 ERROR     -  
 error in code     -  



cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com