ajax

what is the best way of showing progress on an ajax call

i have an ajax call that updates 5,000 records in a database so this takes a lot of time. I have a ajax "Loading image" showing that something is happening but i am looking for a better way to show . . "Updating 50 of 5000 . . .", "Updating 200 of 5000", or something like that. what is the best way to do something like this in ajax /...

jquery appended html is not detecting javascript?

sorry if my question deosnt make sense, but thats the best way i can put it, i have this jquery script that when user clicks the login link, it appends the html form to do so, which works fine, but the appended(login-form) uses jquery to log into the site, but it deosnt seem to detect the javascript, oppose to when i put the login form ...

Jquery, register a function for every ajax call independently

Hi, I want a function to be triggered on every ajax request is sent from a document, and another function to trigger when that request is completed. This code is to be independent with the code which triggers the ajax request. I remember it can be done in prototypeJS easily, but I haven't done this in jquery. Thanks ...

How to use Js->submit() in CakePHP?

Im trying to create a simple Ajax form for a message board in a CakePHP application, but I can't for the life of me figure out how to properly use the Js->submit() function to submit a form via Ajax. Heres the form code within my view: <?php echo $this->Form->create('Message',array( 'type' => 'post', 'action' => 'add', 'onSubm...

server to client push?

I keep getting comet when I search for this, but comet seems to complex for my needs, i.e. 100 users max with probably 10 users online at a time. Is there are better solution for my requirements, i.e. be able to push data to clients, probably between 10-20 clients max at a time. ...

Comet for not-so-frequent events

Is it worth using Comet for events that are not needed "in realtime", but with a possible delay of, say, 1 minute. Such would be: twitter status updates facebook updates I know comet is perfect for a chat application (facebook and GTalk chats are using it), but does twitter, for example, use comet. Or is AJAX-polling sufficient for ...

Avoid HTTP auth popup in a chrome extension (digest)

Hey, I'm currently developing a chrome extension, I need to access some http-auth protected resources (webdav). The HTTP auth is using (in the best case) a digest authentication. I'm able to do the auth directly in the ajax request using the https://login:[email protected]/path/to/ressource form. The issue is : if the login/password...

Callback issue with jquery/js/ajax

UPDATE3 and FINAL: SOLVED thanks to Evan and meder! UPDATE2: I should clarify, I need function updateFilters (a,b) to be called, not created. The function exists elsewhere. Sorry for confusion. The code below does not work as expected - udpateFilters(a,b) is being called before for loop ends. Changing async to false solves the problem,...

Cant Post JSON Object using Jquery.post()

I have the following object that gets created in my javascript application. poll_data[active_question] = { 'question': $('div.question_wrap textarea').attr('value'), 'answers': [ $('div.answer_wrap input#0').attr('value'), $('div.answer_wrap input#1').attr('value'), $('div.answer_...

Need to turn javascript (ajax) vote script into reusable (dynamic) script so it can be used over and over.

Need to turn javascript (ajax) vote script into reusable (dynamic) script so it can be used over and over. I have some ajax that works great, but I have to reproduce it and add unique identifiers [where you see 9 in the code are the unique identifiers that I have to change] for every question added that needs a vote. Need to make it dyn...

jquery ajax 1.4.2's ifModified workaround ?

Hi, I have a script that looks like this : <script type='text/javascript'> $(document).ready(function(){ setInterval(function() { $.ajax({ url: "../Ps/th.php", ifModified:true, success: function(data, textStatus){ if(textStatus!="notmodified") { $("#display").append(data); alert...

Stripe ajax-table with jQuery

For normal html-tables I use $('table.alt tr:even').addClass('bg'); for striping the table. But obviously that doesn't work with ajax. the index of every new table-row is "-1" and therefore every new row gets the class. Even the Live Query-Plugin from http://brandonaaron.net can't help me. Any suggestions? Simon ...

How do I load a page fragment using jQuery?

Hi Guys, I have three pages 1) index.aspx 2) schools.aspx 3) Classes.aspx All the pages has same div section in there pages. Please see below the common DIV section in all the pages, however text will be different for each page. <div id="tab-container" class="tabs-container"> <div class="contentContainer"> <img width="27...

Music playlist via PHP. json_encode() array limit?

Hola! Im using PHP to create a playlist. Two random songs are chosen from a directory, and their name and location are stored in an array and then written to a file via json_encode(). $arraySongs[] = array('name' => $songName , 'mp3' => $webUrl); This works great. I can make a very long playlist, two songs at a time. Id also like to r...

Inserting value to AjaxControlToolkit.HTMLEditor using javascript

I'm using AjaxControlToolkit.HTMLEditor, and I want to add value to it using javascript or jquery like this: alert( $find("eCompose_ctl02_ctl01")); // if $find("eCompose_ctl02_ctl01").attr('value') = "asdfasdfasdf asdfasd asdf sf"; also tried like this: document.getElementById('eCompose_ctl02_ctl01').value += "ababsakas asdasd l"...

Design pattern(s) for a webservice enabled telerik treeview for navigation of a document site

I am currently working on a document management system in ASP.NET 3.5 using the Telerik AJAX toolkit. It consists of masterpage with a title banner across the top and a RadTreeview down the left hand side for navigation through the site. The treeview uses a combination of static nodes and dynamic ones. The dynamic nodes are populated via...

Asynchronous AJAX query with jQuery

Hello, how can I do the following by means of jQuery? var xmlhttp; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState ==...

Javascript comments for ajax calls

At the moment I use phpDoc style comments when documenting javascript functions, mainly because I am used to the syntax and I feel that phpDoc is a good, comprehensive commenting style to adopt. One thing it doesn't cover though is Ajax requests (obviously) and I was wondering if there was a set standard for commenting these? Or if any...

Problem with PHP aplication updates because of the browser cache

Hi, We have an application in PHP. The problem comes when we make updates and changes in this application. Sometimes, the users don't get the last version of the application (HTML and javascript are mainly changed) because of the browser cache. Once we realized about it, we were able to include the next code in our application (We execut...

Preffered calender for ASP.NET

Hey, I search a good calender for my business application. The Microsoft ASP.NET calender is perfect for my requirement, but I heard that this component is not longer supported by Microsoft. My apprehension is that I must in the near future program a new one. Should I use a jQuery calender ? Can I use a future-proof library ? Thank you ...