aika Posted November 24, 2009 Report Share Posted November 24, 2009 uz FF viss ok, bet IE ieķerās 35 rindas 4 charā (error expected identifier, string or number: code 800A0404) 35 rinda ir :" });" /* Created by: Kenrick Beckett Name: Chat Engine */ var instanse = false; var state; var mes; var file; function Chat () { this.update = updateChat; this.send = sendChat; this.getState = getStateOfChat; } //gets the state of the chat function getStateOfChat(){ if(!instanse){ instanse = true; $.ajax({ type: "POST", url: "process.php", data: { 'function': 'getState', 'file': file }, dataType: "json", success: function(data){ state = data.state; instanse = false; }, }); } } //Updates the chat function updateChat(){ if(!instanse){ instanse = true; $.ajax({ type: "POST", url: "process.php", data: { 'function': 'update', 'state': state, 'file': file }, dataType: "json", success: function(data){ if(data.text){ for (var i = 0; i < data.text.length; i++) { $('#chat-area').append($("<p>"+ data.text[i] +"</p>")); } } document.getElementById('chat-area').scrollTop = document.getElementById('chat-area').scrollHeight; instanse = false; state = data.state; }, }); } else { setTimeout(updateChat, 1500); } } //send the message function sendChat(message, nickname) { updateChat(); $.ajax({ type: "POST", url: "process.php", data: { 'function': 'send', 'message': message, 'nickname': nickname, 'file': file }, dataType: "json", success: function(data){ updateChat(); }, }); } Quote Link to comment Share on other sites More sharing options...
0 aika Posted November 24, 2009 Author Report Share Posted November 24, 2009 ok, topiku dzēst nevaru, vainīga bija iepriekšejā rinda, kurā stāv "}," maz ko saprotu no JS, un kādu apsvērumu dēļ autors to "," tur iebāza - nezinu, bet bez tā viss labi strādā arī uz IE Quote Link to comment Share on other sites More sharing options...
0 Grey_Wolf Posted November 24, 2009 Report Share Posted November 24, 2009 vainīga bija iepriekšejā rinda, kurā stāv "}," maz ko saprotu no JS, Nav svrigi kaada valoda ( kautvai Latvieshu ), ja tiek veidots bloks tad - IEKAVAM JABUUT NOSLEGTAM !!! taa kaa, nakamreiz panjem kaadu sakariigu Text redaktoru, kas paraadis kad nav noslegas kadas no iekavaam .. Quote Link to comment Share on other sites More sharing options...
0 indoom Posted November 24, 2009 Report Share Posted November 24, 2009 (edited) IE ir problēma ar tukšiem objektu elementiem, tas ir, nevar atstāt {"one":1,"two":2,} ar komatu beigās, vajag {"one":1,"two":2} Cik skatos, kodā tas komats ir salikts visos objektos beigās. Edited November 25, 2009 by indoom Quote Link to comment Share on other sites More sharing options...
0 v3rb0 Posted November 24, 2009 Report Share Posted November 24, 2009 http://jslint.com ar ir "problēmas" ar komatu beigās. Quote Link to comment Share on other sites More sharing options...
0 aika Posted November 24, 2009 Author Report Share Posted November 24, 2009 Nav svrigi kaada valoda ( kautvai Latvieshu ), ja tiek veidots bloks tad - IEKAVAM JABUUT NOSLEGTAM !!! taa kaa, nakamreiz panjem kaadu sakariigu Text redaktoru, kas paraadis kad nav noslegas kadas no iekavaam .. iekavas bija noslēgtas (skaties divreiz, divreiz!) vainīgs bija , Quote Link to comment Share on other sites More sharing options...
Question
aika
uz FF viss ok, bet IE ieķerās 35 rindas 4 charā (error expected identifier, string or number: code 800A0404)
35 rinda ir :" });"
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.