ajax

How do I write a simple web based DCC client?

Just need a persistent connection to the irc channel from the web server and need the user to type in a name of a file. The client then does the appropriate searches, downloads the file in question and returns the file as a downloadable link to the user. ...

Setting a cookie in an AJAX request?

Hi, I'm validating a login form with jQuery AJAX call to PHP. In php, I create a session and if they checked the 'remember me' checkbox, I want to create a cookie. Here's the php code: <?php include '../includes/connection.php'; date_default_timezone_set('GMT'); $name = $_POST['username']; $pass = $_POST['password']; $query = mysql_...

How can I refresh a page for all logged in users (collaborative editing) using JavaScript, jQuery and HTML?

I want the action to be automatically reflected for all the logged in users. ...

Making sortable table after first loading data into table using ajax

I'm creating a table without page refresh using: <script> function example_ajax_request() { $('#example-placeholder').html('<p><img src="/images/ajax-loader.gif" border="0" /></p>'); $('#example-placeholder').load("get_data.php"); } </script> <input type="button" onclick="example_ajax_request()" value="Click Me!" /> <div id="exampl...

Load links in a CSS frame?

I am using this script to load pages in a css frame (div#maincontent). I want the links in the loaded pages to load in this frame instead of just "going" there. I want to do this using jquery. Here is my attempt: $('#maincontent a').click(function(e) { e.preventDefault(); ajaxpage($(this).attr("href"), 'maincontent'); }); ...

How to update phone numbers for an employee in a database using PHP

I've got a form that allows the user to edit an employees information: name, email, technician level, etc. Well this is not hard in itself, I'm trying to find a good method for updating phone numbers for each employee. I have two tables (that are relevant): technicians and phones. My form allows the user to add, remove and edit any amoun...

Problem during data update in PHP Ajax.

ajax code- ... xmlhttp.open("GET","voting.php?qid="+qid+", uid="+uid+", type="+type,true); ... is this the correct way to sent three parameters?? html- <td ><img src="images/up.jpeg" style="border:none;" title="Like" onclick="doVote($q_id,$_SESSION['UserId'],up)"></td> when I am clicking on this image ajax script is not working...

problem during data update in php ajax.

ajax code- xmlhttp.open("GET","voting.php?qid="+qid+"&amp;uid="+uid+"&amp;type="+type,true); html- <td ><img src="images/up.jpeg" style="border:none;" title="Like" onclick="doVote('<?php echo $q_id; ?>','<?php echo $_SESSION['UserId']; ?>','up')"></td> problem: qid is getting passed to voting.php page but uid and t...

problem during data update in php ajax.

ajax- xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("lblvoteup").innerHTML=xmlhttp.responseText; //document.getElementById("lblvotedown").innerHTML=xmlhttp.responseText; } } html- <tr> <td ><img src="images/up.jpeg" style="border...

How to get the result of a jQuery AJAX call then call another function

Hello Basically I am trying to call a function (function 1), that get the results from another function (function 2). And this function 2 is making an ajax call. So the code would be like this: function f1 () { var results = f2(); } function f2() { $.ajax({ type: 'POST', url: '/test.php', success: func...

loop through some urls using XMLHttpRequest's open() function

i am making a XMLHttpRequest open() call from a for loop.the loop iterates through set of links.I want to wait till the readyState becomes 4(the response comes) before going in to the next iteration.How can i do this?please help ...

Ajax: Change responseText font color based on result

Hi. Programmers here have been extremely helpful in resolving issues for me in the past, so I thought I'd ask an Ajax question. It's probably a simple fix, but I'm new to Ajax. What I'd like to do is change the style of the responseText to red if the result is the pharase, "NOT FOUND". Otherwise the text will be black. Here is the scr...

How to select a class by GetElementByClass and click on it programmically.

I have been trying to use this code to read the element by class in html/ajax knowing GetElementByClass is not a option in webBrowser.Document. I can't seem to get a return value then invoke the member. Is there a work around for this? References: Getting HTMLElements by Class Name Example: <span class="example">(<a href="http://www.t...

Need advice on how to better code this function for frequent re-use and adding new functionalities

Hi, I need help to better simplify this process. In order to fully comprehend how everything fits together please refer to my previous post - My Web based system Basically, I want to send more commands to this procedure that I have written. Write now there is only one function I have implemented, detect, but I want to add more in the fu...

Bind custom event handler after ajax load

Specifically I'm looking to bind lightbox to a specific element. Normally I would just do this: $('a.lightbox').lightBox(); but that isn't working since I'm doing some loading with AJAX. Looking at the jQuery API I found .bind() and .live() but I'm not getting anything when I do $('a.lightbox').bind('lightBox') after the AJAX .load() cal...

Using a progress bar to load a time-consuming script asynchronously

Hey guys, I'm loading a dynamic application (which takes 20-30 seconds), and I'm trying to create a dynamic progress bar that shows the user how much of the task has been completed dynamically as the page loads. I'm accomplishing this by setting buffer to false and having my script output a line of JavaScript as it progresses that call...

Filter rows of an HTML table generated from a database using AJAX

I have an HTML/XML table generated by AJAX that displays limited columns of a database table. I would like to filter rows of the HTML/XML table using columns from the database that aren't part of the HTML table. Example: MySQL tables (ignore bad syntax): TABLE technicians (id, name, email, ...

Can I test Ajax functions locally?

I have a simple call to replace the contents of a <div> with those of another HTML file using the .load() function: $('#content').show().load('01.html'); 01.html is in the same folder as this page. But the function isn't being executed. Is there a problem with my code? Or is it that the .load() function won't work until it's being s...

What is a good jQuery/Ajax lightbox plugin?

I am looking for a light weight, cross-browser compatible lightbox with features of displaying a pop-up window. I want to keep the popup window to be run in the lightbox and no matter what they do in the lightbox, the lightbox should never close until it is either clicked somewhere in the black area or by simply clicking an "X" in the u...

consuming asmx web service using ajax/jquery in ASP.NET?

HI I am trying to save data using web services-jquery and json, from some example on the web I wrote a similar code but a String instead of int: //----------------------------------------- <div id="dialogL" title="Create a new Layer"> <p>Enter Name:</p> <input id="txtValue1" type="text" size="40" /> <p>Enter Description:</...