ajax

AJAX and PHP data transfer

Well basically what im trying to do is create a method that can take any datatype and essentially convert it into php recognized data or JSON for that matter. So say i wanted to pass an array, a 2d array, or just some basic string. I would call this function pass in the parameters and sent it off to php. Now i would reverse engineer this...

what happens to javascript variable after a call to the server ?

I just began to learn javascript, so here is a silly question : What happens to a javascript variable after a call to the server? Are all the variables wiped out? I read somewhere that javascript variable in ajax can act like session or cookie. Is that true? ...

missing lines because <br> in xml

Hi! i have a xml like this: <cont><?php echo nl2br($cont); ?></cont> the response is: <cont> 2<br/> 3<br/> 4<br/> </cont> in the page the code is: mainParentElement = document.getElementById('div_cont'); RemoveAllChildElements(mainParentElement); mainParentElement.innerHTML = "<div class=\'div_cont\'>" + xmlDoc.getElementsByTagNa...

how to delete session associated data .

say i store some data associated with a session id in a database . how do i delete the data when the session is timeout in php(i do not want to fill my file sever with all junk data.)? is there any call back function to call in php ? ...

How to have jQueryUI dialog box dynamically load content

I love jQueryUI's dialog boxes. However, there doesn't seem to be a way to dynamically load content built-in. I guess I have to use some other approach to achieve this? Will iframes load content only when they're made visible? Is that the right way to do this? I'm open to other dialog box mechanisms if they're more suited for loadin...

Simple ajax/prototype problem

Hi, im beginning with Ajax, i have problem with including Ajax files. Ajax code written in original page (like index.php) and placed in (head) section works fine, but when i try to place code in external file (in js folder, where is placed prototype.js file), i don't get any response, not even in Firefox Error Console. I haven't change...

How does Google Instant change the referer sent by the browser?

If you click on a result in Google Instant, the referer sent by your browser to the destination website contains a bunch of parameters, including the all important q=[autocompleted query] But you're coming from a page whose URL is simply http://www.google.com/ with a bunch of stuff after the # character, i.e. as an on-page anchor. So t...

[jqtouch] How do I detect the start of a ajax call?

In JQtouch, any link is automatically convert into ajax call. I want to detect the moment the ajax call was send. This is so that i could insert a loading screen to let users know that the system is processing the submission. I search through jqTouch API and apparently they only have callback events for page animation. Am i missing out ...

How Do Google and Bing's Autocompletion Work?

How Do Google and Bing's Autocompletion Work? When I use firebug I see no XHR's. In that case, how is the data retrieved? ...

Ajax client-side framework failed to load Asp.Net 4.0

Hi Geniuses I got a complicated problem with ASP.Net 4.0 Ajax....I started a website with Visual Studio 2010 on my machine,and added some update panels they used to work fine,but suddenly i got that series of errors when i run my website Microsoft JScript runtime error: ASP.NET Ajax client-side framework failed to load. Micros...

jquery getElementById on a ajax data

I got a function in javascript that first checks if the username is the required length and than sends the username to a page for a test if the test is a success there will be a <span id="username">true</span> else <span id="username">false</span> I keep getting an error that getElementById doesn't exist on the return data function...

Check if user exists in database (form)

Hi, I have a script which allows users to sign up, which imports data into a MySQL table. user_availability.php http://pastebin.com/PSRndXbq number.js http://pastebin.com/iYAPuwN7 This script will tell the user if that number is present in the table. However it continually says its not in the table despite it being in there (looking...

Rails: using jquery + facebooker to generate fb:dialogs

I have a list of Area objects that I'm displaying in a Facebook application. I would like to have a link for editing them, next to each row. I would like the form to appear in a <fb:dialog>, so I created the following partials: # _edit.fbml.erb <% fb_dialog("edit_area_#{@area.id}", false) do %> <%= fb_dialog_title "Edit area" %> <% fb...

AjaxUpload $_FILES array is empty

I'm trying to use wordpress' built-in ajax to process an upload using the AjaxUpload script. The script was updated in august, and now i can't get it to work any more. http://valums.com/ajax-upload/ here's my jquery... this seems to be in place as i get input is transformed into an upload button and on selection of the image it begi...

jQuery AJAX callback not fired

I have an AJAX request: $.ajax({ url : "proxy.php", type : "POST", data : xmlData, contentType : "application/x-www-form-urlencoded", processData : false, success : function(data) { // success }, error : function(data) { // error }, }); Which is being answered by a PHP proxy: header('Conte...

How to detect if file is being accessed or requested?

A I have a PHP file that if the user access it directly he should be redirected to another location, but if my script call it through ajax, it should do nothing special. For example, if a user access /site/page.php he should be redirected to /index.php?view=page But if he is on the index.php?view=page the file should load without ...

How does your rails app include javascript?

Hello all, I'm very curious how your Rails apps include javascript. For example: do you package all your js code into a single file and serve it for all requests? do you conditionally load certain js depending on controller/action? what tools or techniques do you use, ie: asset_packager, yui compressor, sprockets, BigPipe inspired imp...

Help with the jQuery Address Plugin

I have a website with ajax loaded content. Now I want to implement the jQuery address plugin for better user experience and SEO crawling. With this line $.address.value($(this).attr('href')); the address changing thing works, but how can I do the history support, crawling and so on? There is something with the $.address.change(funct...

Alert after $.post shows different data

Look this code: <input type="hidden" id="finalvalue" value="2" /> <script> $.post("/increment_in_one", { param: 2 }, function (data) { alert( data ); // this shows: 3 $("#finalvalue").val( data ); alert( $("#finalvalue").val() ); // this shows 3 }); alert( $("#finalvalue").val() ); // this shows 2...

Creating a JSON object from multiple form fields using jQuery

Hi guys, I am trying to create a JSON object from a bunch of grouped HTML elements, this is my markup, HTML: <div id="locations_wrapper"> <div id="location_0" class="locations"> <div class="container"> <label for="locations_province">Province: </label> <div> <select id="locations_province" n...