Can anyone help please!!!! : (......




--- In svg-developers@yahoogroups.com, "shulo1978" <[EMAIL PROTECTED]> 
wrote:
> 
> Hi, I has a problem with JavaScript when it reads data from a JSP. 
My
> program works when the JSP pass only one single record at each 
time.
> But in reality, it passes several records at a time
> The record generated will be something like
> {time:****, text: *****}{time:****, text: *****}{time:****, 
text:****}
> my JavaScript code is like this:
> var time =[];         
> var theTime = [];
> var record = {text:[],time:[]};
> var myRecord = {text:[]};
> 
> function loadData(data)
> {
>       if(data.success)
>       {
>               if(time.length>=numberLine)
>               { 
>                       myRecord['text'].shift();
>                       myRecord['time'].shift();
>               }
>               eval("var content = " + data.content);
> 
>               record['text'].push(content.text);
>                               
>               record['time'].push(content.time);
>               }
>               drawInfo();
>               setTimeout('getData()',wait);
>               }               
>               else
>               {
>                       alert('loading data failed');
>               }
>       }
> and the drawInfo
> function drawInfo(){
> 
>       for(j=0;j<record['time'].length;j++){
>               myRecord[j].firstChild.data = record['text'][j];
>               theTime[j].firstChild.data = record['time'][j];
>       }
> }
> when every time the JavaScript get the record from the JSP, if 
there
> is only one, it works. However, if it is more than one, then it 
stuck.
> : (.... I am not very familiar with JavaScript, anyone can help? 
Thank
> you very much.





-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to