Rila_xp Posted September 11, 2011 Report Share Posted September 11, 2011 Am codul urmator,care nu vrea sa imi functioneze deloc in ie,in firefox merge perfect!Pareri,idei?Ce sa ii fac?<html><? require_once("users.php"); ?><head><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>Chat</title> <link rel="stylesheet" href="style.css" type="text/css" /><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script> function Chat () { this.send = sendChat; this.load = load();}//gets the state of the chat//send the messagefunction sendChat(message, nickname){ $.ajax({ type: 'POST', url: 'process.php', data: { 'function': 'send', 'message': message }, success: function(data){ load(); }, });}function load () { $(setInterval(function() { $('#chat-area').load('refresh.php'); $("#chat-area").attr({ scrollTop: $('#chat-area').attr('scrollHeight') });}, 1500));} var chat = new Chat(); jQuery(function() { // watch textarea for key presses $("#sendie").keydown(function(event) { var key = event.which; //all keys including return. if (key >= 33) { var maxLength = $(this).attr('maxlength'); var length = this.value.length; // don't allow new content if length is maxed out if (length >= maxLength) { event.preventDefault(); } } }); // watch textarea for release of key press $('#sendie').keyup(function(e) { if (e.keyCode == 13) { var text = $(this).val(); var maxLength = $(this).attr('maxlength'); var length = text.length; // send if (length <= maxLength + 1) { chat.send(text, name); $(this).val(""); } else { $(this).val(text.substring(0, maxLength)); } } }); }); </script></head><body onload="setInterval('load()', 1000)"> <div id="page-wrap"> <h2>Chat</h2> <p id="name-area"></p> <div id="chat-wrap"><div id="chat-area"></div></div> <?session_start(); if(isset($_SESSION['nume'])){?> <form id="send-message-area"> <p>Your message: </p> <textarea id="sendie" maxlength = '300' ></textarea> </form> <?}else{echo"<center>"; echo "<h1><form action='' method='post'>Daca vrei sa vorbesti pe chat introdu un nickname! <input type='text' name='nume' /><br /><input type='submit' value='Submit' /></form></h1>"; if($_POST['nume']==='') { }else{ $_SESSION['nume']=$_POST['nume']; } echo"</center>";}?> </div></body></html> Quote Link to comment Share on other sites More sharing options...
tdxev Posted September 11, 2011 Report Share Posted September 11, 2011 deschide consola si vezi daca apare vreo eroare.. Quote Link to comment Share on other sites More sharing options...
Rila_xp Posted September 11, 2011 Author Report Share Posted September 11, 2011 "Line:1Char:1Error: Object expectedCode:0""Line:40Char:4Error:Expected identifier,string or numberCode:0" Quote Link to comment Share on other sites More sharing options...