ajax

Getting content: AJAX vs. "Regular" HTTP call

I like that, these days, we have an option for how we get our web content from the server: we can make an old-style HTTP request (with its own URL in the browser) or we can make an AJAX call and replace parts of the DOM on the fly. My question is this: how do you decide which method to use when there's an option to use either? In the "...

how to call ajax method when I select a data in a selection then perform a SELECT query from it

how can I call jquery ajax method when I select a data in a selection then perform a SELECT query from the selected data .... then i want to show the result from the query in the #info div Can someone help me? html looks like this <form action="details.php" method="post" > <select> <option value="volvo">Volvo</option> ...

ASP.Net Ajax $find() Jquery Equivalent

Is there a JQuery equivalent of ASP.Net Ajax's $find() function? $() != $find() ...

use jquery on DOM that has been added afterwards with jquery?

here is the case. with jquery ajax call i have added a new link < a id="new_link > and i want to use jquery on that newly added link: $(document).ready(function(){ $.post("static/js/jquery_call.php", function(data){ $("#div_id").html(data); }); $("#new_link").click(function(){ ..... (and so on) but it d...

jquery ajax error cannot find url outside of debug mode

I inherited some code two weeks ago that is using the jquery.ajax method to connect to a .NET web service. Here is the piece of code give me the trouble... if (MSCTour.AppSettings.OFFLINE !== 'TRUE') { $.ajax({ url: url, data: json, type: "POST", co...

Load MS Word files with AJAX

I want to dynamically load (AJAX) the text from some Microsoft Word files into a webpage. So I might have a link to essays I've written and upon mouseover have it load the first few sentences in a tooltip. ...

extreme ajax implementation in web service?

if one wants to make a website that acts like a desktop software, isnt it better to just use one page and use ajax to retrieve all other php-files and update the content of current page with eg. jquery? i mean, just ONE page, you get the idea of my question i think... is this to recommend? what is the pros and cons? i mean, its really...

Automatically initialize rich text editor on top of all textarea's, including ones that are loaded via ajax

I'm developing an ajax heavy web app, and would like to have textarea's (with class="ui-richtext") automatically initialize TinyMCE. This is easy for textarea's that are loaded normally, but how about for content that is loaded AFTER the fact using ajax? I was thinking something along these lines: (i'm using jquery) $("textarea.ui-ric...

jQTouch loading remote data

I'm using jQTouch which is an implementation of jQuery with some extra stuff for mobile devices. I have a div with id=testinner. When I use this code, it works fine from a local file: $("#testinner").load("test.html"); But if I test with a remote file, nothing loads $("#testinner").load("http://www.google.com"); Anyone have any id...

When do I need to use JSON and XML?

I know there are a lot of sources which explain this, but they just talk about storing key/value pairs in an array or in an object. I can't understand why or when should I do this, although I always use jquery's AJAX. As an example, if I make a forum when do I need this? Can someone give real world examples? The same goes for XML. It s...

Is there any workaround for the UpdatePanel + Server.Transfer problem?

I'm trying to use an UpdatePanel in my ASP.NET application. Unfortunately, it seems that I can't do this if I am using Server.Transfer() in my application. Modifying that component of the application is not possible - the architecture makes extensive use of Server.Transfer() - in essence, every page request goes through this method. Doe...

jQuery: using .live method also for elements/plugins?

hi all, i made a simple jQuery button widget (plugin) which initializes like this: var cmd = $(".tButton"); cmd.tButton(); is there a way to use .live for all future buttons (getting loaded via ajax)? thx ...

Sinatra/Rack Sleep until Response Ready (like Exchange ActiveSync)

I'm wanting to do a lightweight push-style HTTP response in my existing Sinatra web app. Is there any mechanism that allows me to not respond to an HTTP request and keep the connection open until I wake up the connection at a future time? ...

Experiences with Javeline / Ajax.org javascript framework?

Hi all, I've been looking for javascript frameworks to build a spreadsheet-like app and found Ajax.org. Does anybody have experience with it? With that name is hopeless to try to google for it. I'm curious about how it compares to Sproutcore or Cappuccino. Thanks! jbar ...

send and retrieve key-value pair between php and jquery ajax?

i use $.get to run php file. how can i send key-value pair (eg. variables) from the php-file to jquery? and when sent, how can i retrieve them with jquery? i want to validate eg. if(key == value) in jquery. and what is the difference between $.getJSON and $.get? if i want to run php i cannot use $.getJSON? i tried in the php file use: ...

What functions are necessary to program a PHP script that can interact with an AJAX website like a normal browser?

I want to know what is necessary to create a PHP script that can interact with a website like a normal browser. The website would be rich in Ajax, so the PHP script needs to know how to handle Javascript functions and maintain an continuous connection with the website. ...

json jquery php question

i dont understand one thing. if i want to get JSON data (key-value-pairs) from php to jquery using ajax...which of these following ones should i use? $.get $.post $.getJSON do i need to use getJSON if i want to use json_encode in php file? but what if i want to send with post? (there is no postJSON)? and one more thing: in php fil...

What's the best way to call a function in YUI3 only if a series o XHR (IO) requests are successful?

I guess this question isn't only specific to YUI, but that's the JS library I'm using and a specific answer would be helpful. Basically when loading a page, I want a script to run a few XHRs using Y.io, and if they all return the data successfully then I want the script to move on to the next step, which will manipulate the data receive...

jquery ajax get json array?

i use $.getJSON to call php file. it echos this back. for($i=0; $i<=10; $i++) { $nr[] = $i; } echo "{'result': 'error', 'count': '$nr'}"; in jquery to get result i just use alert(data.result) how do i get all the nr:s in count? EDIT: But how do i loop the array through in jquery? All the keys are numeric and i dont know how to...

let jquery know which was the last visited php page?

this is a little bit tricky. usually when someone clicks on a link that requires him to register, this person will be redirected to the registration page and then back to the last visited page. this is possible cause the link sent a GET key through the url to the registration.php which uses the key to go back to last visited page. but ...