ajax

How to make all connected browsers reload initiated by a server-side event

Suppose there is a webpage with dynamically generated content -- say a div containing the current number of connected browsers. When the count changes on the server I want all connected browsers to reload the count so that everyone sees the increment/decrement. What's the best way to accomplish this? Keywords: ajax, broadcast, browse...

how to stop an update panel from refreshing when the same updatepanel does the postback

I have an update panel with a linkbutton inside of it. The updatepanel has its updatemode set to conditional. From what I understand, regardless if the updatemode is set to conditional, it will refresh the panel, if something inside of it initiates the postback. Is there anyway around this? ...

PHP and AJAX problem?

When a user casts a vote the script updates my database but it wont display the following code below to tell the user its vote has been excepted. //This will output the movie id, new rating, new votes, and a message. echo "<result id='".$id."' rating='".$rating."' votes='".$votes."'>Vote cast and saved.</result>n"; How can I fix thi...

JavaScript problem?

Now when I have a user cast a vote the script updates my database but it won't display the following code below to tell the user its vote has been excepted everything else works correctly except my AJAX code. How can I fix this problem to get the below code to display the new rating when user enters his or her vote? I'm using PHP Here...

updating database on user close the page

how can i update a table when a user close the page or exit from that page.................. ...

verifying if the user is not typing any thing in a box

i am making a chat with php ajax i want to show a message if the user has not typed any thing more than 1-2 minutes or event not navigating from one page to another.......if so than shows a message in the chat box [ last message recieved 2-3 mintus ago ] like in yahoo....... ...

how to populate dropdown with dynamic date based on 2 other dropdown boxes

I have 3 dropdownlists 1. here I need to select a quality of products 2. here I need to select standard or non standard IF standard then the 3rd list needs to be populated with dynamic data IF non standard then nothing (3rd box empty) However the populated list (3rd) needs another selection which is based also on the selection out of th...

php ajax one to one chat problem

i am trying to make php ajax one to one chat.............my problem is that how can i fetch the chat messages from table by both user1 and user2........ my database table has........ id, from, to, text, time fields.............. what would be the query to show the messages from both users with their respective names.... ...

php ajax chat problem

This is my php code........... $root = "http://localhost/"; $sql = mysql_query("SELECT * FROM mychat WHERE (too='$mid' AND froom='$uid') OR (too='$uid' AND froom='$mid') ORDER BY id ASC"); while($ro=mysql_fetch_array($sql)){ $from = $ro['froom']; $to = $ro['too']; $text = $ro['text']; $time = $ro['tim...

OPTIONS request being made for $.ajax

Hello, I have the following code which,currently im running on my local machine.I am making a call to a php script called getxml.php,which should send the contents of an xml file as the response. But,instead of a GET request, in Firebug i see that an OPTIONS request is being made, like OPTIONS getxml.php . I think im not making a cross...

jquery ajax completion event

can someone show me how to make a jquery ajax completion event. $("#submit_js").click(function() { $.post( "user_submit.php", {comment: $("#comment").val(), aid: imgnum}, function(data){ /*alert(data);*/ }); }); when this POST request completes successfully, I want to show the message in a specifi...

How to start an AJAX request at a significant pause during user inputting using Jquery?

When a user is inputting something, I need to check user input against the corresponding data in database using AJAX, but I can't continuously check user input against the data in database because that would overwhelm my database server. I just want to start an AJAX request at a significant/obvious/sensible pause during user inputting. F...

PHP based Ajax chat / support / assistance script

I have been assigned a task in a field I don't know anything about: Live chat directly on a PHP based web site. One-on-one only (Visitor to admin), with the possibility for both parties to store the conversation as text (though I could add that if necessary). Full fledged conversation management (continue conversation etc.) would be a pl...

Jquery Ajax Returned Array - how to handle in Javascript

Hi there, If someone could assist me please. I'm doing a jquery Ajax post, for some reason the Json object isn't working so just returning a php array instead $.post ( "classes/RegisterUser.php", $("#frmRegistration").serialize(), function(data) { alert(data); } ); The data is returned to Javascript 100% as ...

best practice for dealing with common "structural" elements of pages?

Hi everyone, Very basic question: I am coding a web app that has a handful of pages. These pages have the usual shared elements: eg, the site's header/masthead and a side-bar are present on all pages. The HTML is static (not dynamically generated, its "ajaxy-ness" is done client-side). What is the best way of importing/"including" thos...

Ajax Calendar always visible

Hi there, Is it possible to have an ajax calendar inside a div and make it be always visible,like asp:calendar? and highlight today's date and add some task to the calendar for different dates? Thanks in advance ...

JSON2.js not recognised by IE 7 or Opera 10.01

I have a page that's working fine in Firefox 3.5.6 but not in IE 7 or Opera 10.01 I'm including the minified version of JSON2.js from json.org in a script tag in the head section. In Firefox the data gets parsed into an object. Opera and IE both throw errors, saying they can't find the JSON object. How can I fix my javascript so that ...

Ajax success event not working

I have a registration form and am using [jQuery][1] [Ajax][2] to submit it. Here is the jQuery Ajax code: $(document).ready(function() { $("form#regist").submit(function() { var str = $("#regist").serialize(); $.ajax({ type: 'POST', url: 'submit1.php', data: $("#regist").serialize...

How to initiate a function including AJAX request some time after the user's last input?

This is the crucial code: var ajaxCallTimeoutID = null; $(document).ready(function() { $("input[id^='question']").live('keyup',function(ev){ id=this.id.substr(8); if (ajaxCallTimeoutID != null) clearTimeout(ajaxCallTimeoutID); ajaxCallTimeoutID = setTimeout(subjectivecheck(id), 1000); }); }); However, subjectivechec...

jQuery AJAX & Multiple sp Result Sets

Is it possible to use a stored procedure that returns multiple result sets in json format and process them as part of one request using ajax calls in jquery? In other words, I have a stored procedure that returns several result sets that are to be used with a series of select boxes that are all being filtered by the same criteria. If...