ajax

Wasteful Ajax Page Loading

I've started a new job, and the portion of the project I'm working has a very odd structure. Every pages is a .Net aspx page, and it loads just fine, but nothing is really done at load time. Everything is really loaded from a jquery document.onready handler. What is even more...interesting...is that the onready handler calls some ajax...

Eval response.d in Jquery Ajax

What is the point of doing this: var resultsArray = (typeof response.d) == 'string' ? eval('(' + response.d + ')') : response.d; inside onSuccess() callback of $.(ajax) call? ...

How do they do that? Transparent foreground on a web page

You know how sometimes you are on a good site and you click a button (like to submit a form) and the form doesn't go away, instead, the foreground becomes transparent and it contains a message of some kind, or another page. The message is at the forefront but the previous page is still mostly visible behind it - how do they do that? I'm ...

document.getElementById().innerHTML for select tag doesn't work in IE

i have the following simple script <input type="button" onclick="document.getElementById('a').innerHTML = '<option>something</option>';"/> <select id="a" style="width: 150px;"> </select> but it doesn't work in IE. could you tell me why? thanks ...

AJAX, Subdomains and the 200 OK response.

A non-hypothetical but abstracted situation: I have a domain www.foo.com, from which I'm making an AJAX POST to beta.foo.com. Examining the XHR object, I see a response header of 200 OK, but no response text - I even get a response 12B long, which is the exact response (a 12-character string) that I'm expecting - but the response text ...

read xml in javascript problem

hai all, i have a problem with my code to read the xml.I have use ajax to read xml data and populate it in combobox. My problem is it only read the first data.Here is my code my xml like this <info> <area> <code>1</code> <name>area1</name> </area> <area> <code>2</code> <name>area2</name> </area...

How do I ensure AJAX still works after content moved from iFrame through DOM manipulation

After submitting an iFrame, content with AJAX enabled functions is returned and everything works. Once I move the content out from the iFrame to the main page through DOM manipulation and remove the iFrame, AJAX stops working. How can I make it work? I grab the body content of the iFrame and move it to an outside element through .inne...

alt-tab sort of web design

I am thinking of designing a web site having multiple related services. For every action of the user in a service there will be some computation going on in each of the other services. I want to display the service in action (chosen by the user) in the middle of the page in enlarged mode and rest of the services as small sized (shrunk)...

Best practice when using WebMethods and session

Hi all, I want to reduce postback in one of my application page and use ajax instead. I used the WebMethod to do so.. I have a static WebMethod that needs to access the session variables and modify. and on the client side, i am calling this method using jQuery. I tried accessing the session as follows: [WebMethod] public static voi...

Best practice for inserting large chunks of HTML into elements with Javscript?

Hey guys. I'm building a web application (using prototype) at the moment that requires the addition of large chunks of HTML into the DOM. Most of these are rows that contain elements with all manner of attributes. Currently I keep a blank row of html in a variable and var blankRow = '<tr><td>' +'<a href="{LINK}" onclick="someFun...

Why always fires OnFailure when return View() to Ajax Form ?

I'm trying to make a log-in log-off with Ajax supported. I made some logic in my controller to sign the user in and then return simple partial containing welcome message and log-Off ActionLink my Action method looks like this : public ActionResult LogOn(LogOnModel model, string returnUrl) { if (ModelState.IsValid) { if ...

Creating a form dynamically

Hi, I use a search button that creates a form dynamically at the server side and returns it with Jquery syntax. After I fill-up the form and click on submit button, there is another .submit() Jquery function that suppose to be called to validate input before data is sent to the server. But, for some reason, this function is never called...

Use AJAX to reload captcha

Hello! This question may have been asked already - but unfortunately, I could not find any satisfactory answers. I will just ask it for my concrete case and ask the admins not to delete the question for at least a few days so I can try it out... I have a page. It uses a captcha. Like so: <?php session_start(); // the captcha saves the...

pagination panel should remain static

i've a search form in which a user enters the keyword and the results are displayed with pagination. everything works fine except for the fact that when the user clicks on the 'Next' button, the pagination panel disappears as well when the page loads to retrieve the data through ajax. how do i make the pagination panel static, while th...

How to validate username using Javascript?

Hi, I want to know how can I validate using Javascript that if user has entered any username at the time of creating an account is already present in database and ask user to type any other username? ...

Ajax to read from form

Hello, I'm writing a store system for my game, it worked quite well until I found out that it only takes the amount of first entered Item. function pbuy(buyitem) { var amountc = "amount-"+buyitem, var amount = $("#"+amountc+"").val(); $.ajax({ type: "POST", url: "store2.php", data: "buyitem="+ buyitem+"&amount="+amoun...

How to flush data in php and disconnect user but keep the script alive

This is a trick question, while developing a php+ajax application i felt into some long queries, nothing wrong with them, but they could be done in background. I know that there's a way to just send a reply to user while throwing the real processing to another process by exec(), however it dosen't feels right for me, this might generate...

Using JQuery Ajax to call a php function

Hello! First and foremost thank you for checking out my problem, and for any help you may give! Okay, so like the title says I'm in need of calling a php function from my index page, which adds a new record in my database as a vote, using JQuery Ajax. This function will return one integer, which will then be printed inside the form but...

can't load/read yahoo geocode as xml and read it in jquery

Hi, I tried saving the result as an xml, when I read from there it works, but if I read it from yahoo's api, doesn't load anything. You can check it here here's my script $(document).ready(function(){ $.ajax({ type: "GET", url: "http://local.yahooapis.com/MapsService/V1/geocode?appid=YD-9G7bey8_JXxQP6rxl.fBFGgCdNjoDMACQA--&amp;zip=100...

Retrieving image from database using Ajax

I'm trying to read image from database with Ajax, but I could not read the xmlhttp.responseText to the img src. The image is saved as binary data in database and also retrieved as binary data. I'm using Ajax in JSP, because I want to give the user the ability to upload images and I will view the last uploaded image, on mouse over action ...