jquery-ajax

JQuery ajax call does not take alphanumeric parameters!

Hello all, JQuery seems to be giving an error when trying to pass an alphanumeric parameter like so: $.ajax({ type: "POST", url: "Default.aspx/AjaxTest", data: "{eventID:9a5}", contentType: "application/json; charset=utf-8", dataType: "json", ...

ajax postback in jquery

i'm having a ajax request on the page. is their any way to find when a ajax is requested on the page. in jquery or javascript to find or initiate a function whn ajax request is called in a page. ...

How to invalidate cache when the page is modified via Ajax?

I have a page that has some editable features that are updated via Ajax when they are edited. There are some values that are stored in a cookie so that they can be loaded when the page is loaded. If the user makes a change, then goes to a different page and clicks the back button to return, the original page is loaded from cache withou...

Loading jQuery dialog with the result of an AJAX page post

I'm trying to build a jQuery dialog that when displayed will show the results of a form on the same page as the dialog being posted to another server. The HTML sent back to the dialog would also contain a form that would need to work within the dialog. I've done jQuery AJAX posts before, but I can't figure out how to tie the post result...

Use Ajax() function in Jquery to load PART of an external page into div

I'm trying to load a DIV element from an external page into my current page using the Ajax/jQuery.ajax function. While I have successfully been able to load an entire external page, I can't seem to load just the DIV element. Here's my code: $("a").click(function() { /* grabs URL from HREF attribute then adds an */ /* ID from the ...

jQuery: refresh content of div once form has been submitted and modal window closed.

Short and skinny: I'm still a jQuery n00b Form in modal window, data submitted and user receives confirmation. Once the submission confirmation message is received, the user can close the window. However, the page has not refreshed - so if the user goes to click on the link to activate the modal window and make a new submission, the con...

jquery ajax doesn't work in IE

Hello, i have the following function to add an article in my basket: $(".addtocart").click(function(){ var product = $("#pid").val(); var qty = $("#qty").val(); if(isNaN(qty) || qty == '') alert("ERROR"); else{ alert("HIHI"); $.ajax({ type:"post", ...

How to send a server error response using php?

Hi all, As soon as the user clicks the delete button my jQuery script asks the server to delete the selected item. Now I want my php script to send a success or an error response. Is it possible to fire the error callback in case the item could not be deleted? Thanks my jQuery code: $.ajax({ type: "post", url: "myAjax.php" , d...

Iterating through/Parsing JSON Object via JavaScript

Hello, I'm having a problem with jQuery/Ajax/JSON. I'm using a jQuery ajax post like so... $.ajax({ type: "POST", dataType: "json", url: "someurl.com", data: "cmd="+escape(me.cmd)+"&q="+q+"&"+me.args, success: function(objJSON){ blah blah... } }); It's my understanding that this will return a JavaScript JSON object? Th...

Request-URI Too Large window.open - workaround

Hello All: I am opening a window and passing set of parameters to it. In this case, I am sending json string. At time, the info is toolarge, and Request-URI Too Large occurs. window.open('../pssops21/php/createPhonePdf.php?strSelectedItems=' + strSelectedItems + '&strQBNumbers=' + arrQBNumbers, 'mywindow', 'resizable=1, scro...

dynamically load user controls using jquery ajax

Hi, I've read several articles on this issue, and technically speaking, all they end up doing is taking html code from a user control and injecting it into the containing page. I want a true user control to be loaded on to the page, so that on postback, I still have access to that loaded user control and I can validate fields on it on ...

jQuery return $.get data in a function

Hello, I'm trying to call a function that contains jQuery code. I want this function to return the results of the jQuery statement. It is not working and I'm trying to figure out why. function showGetResult (name) { var scriptURL = "somefile.php?name=" + name; return $.get(scriptURL, {}, function(data) { return data; }); } alert (s...

How should I organize my ajax actions files

I would like to know what's the best way to organize my php project with ajaxActions files. At the moment I have a few ./process/ajaxAction_pagename.php files containing my actions like this: if ($action=="actionName") { //code } I'm just wondering if there is a better (or more standard) way to do it. ...

jquery right way to bulk ajax requests

i have list of rows that user select and i want to delete them, one by one and show the result in the end. obviously if i just do simple loop and call each time ajax function, but how can i loop and check which one successed and which one failed and when they are all done? how would you do it? what is proper way of doing the bulk editi...

Using jquery to get google "results 1-100 of about" ??? "for..." value

Hello, I have a question. How could I get the data from a google search response? I.e.:Results 1 - 100 of about 230,533,709 for blogs. (0.25 seconds) I want to get the value 230,533,709. I use php to get the html response from the url. I.e.: http://blogsearch.google.com/blogsearch?hl=en&ie=UTF-8&q=blogs&btnG=Search+Blog...

Best practice for function flow in Javascript?

I have what I thought was a relatively easy Ajax/animation that I'm adding to a client site to select between projects for display as images. The flow goes something like this: User clicks on a thumbnail in a project overview (pHome). Using jQuery, ajax load in an XML file with the image, caption and project description data (project1...

Calling wcf rest service from jquery doesn't work

I have written a really simple wcf rest service which seems to work fine when I make requests to it through fiddler but I cannot get it to work when calling it from JQuery. Service: [ServiceContract] public interface IService1 { [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "customers/{regionId}"...

JQuery everywhere.

I would like to know if I can include some Jquery inside another JQuery function, I'm changing the src attribute of the #ggMap item onclick="$('#ggMap').attr('src', 'googleMap.php?x=690&y=390&address=');return false;" and Thishis is what I'm trying to do: onclick="$('#ggMap').attr('src', 'googleMap.php?x=690&y=390&address=$('#addr...

How do I enable the back button on ajax calls with long options in the .NET url?

I am trying to enable the back button on ajax calls...my solution...when an ajax call is made, create a guid, insert into the database the variables and insert the guid into the URL...when the user hits the back button, call the database with that guid to get the variables and set the page up....so back button would work normally in ajax...

Jquery UI tabs abort does not work.

Hi I have a jquery ui 1.7 tab and I am trying to "abort" the request. so I have this in my document rdy. $.ajaxSetup( { 'timeout': 10000, 'error': function errorCallback() { jAlert('The server is acting a bit slow. Your request has timed out. Please try again.', 'Server Ti...