ajax

PHP: Possible reasons for $_SESSION['var'] to be mysteriously undefined with flash upload

I am having trouble with a session id not being defined. The session variable is being called on a page that a form posts to via an ajax/jquery query. The session variable is called on every other page without a problem. The variable is set when a user logs in, and is checked by an auth.php file. The auth.php file finds the session v...

How can I setcookies in php server side with ajax and read cookies in the real time with ajax or javascript?

How can I setcookies in php server side with ajax and read cookies in the real time with javascript? Example: After pressed "ok" button, the client side will call ajax and ajax will call to php server side to collect data. It will also assign value into cookies in php server side while it's getting the data. At the sametime, I want to...

How to buffering an Ajax Request?

Hi guys, I have a simple ajax function, something like this: var x; var myRequest = new Array(); function CreateXmlHttpReq(handler) { var xmlhttp = null; try { xmlhttp = new XMLHttpRequest(); }catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ xml...

CSS styles gone after Ajax call in IE 7

I've had a problem with my styles not being applied after AJAX calls. My styles were not in the < HEAD> section of the page, and they were only recognized by IE on initial Page_Load. If you know of any other ways to fix this problem, post them here. This is more of a reference, hope this helps some people. ...

c# Ajax Lazy Loading

Hi All, I need to populate 4 GridViews on an aspx page, but I only bind a datatable to one of them on page load. I need to pupulate the other 3 after page load. does anyone know the best way to do this using ajax ? Currently I'm using javascript to __doPostBack on a button that pupulates the 3 GridViews but unfortunately this forces...

How do I make jQuery wait for an Ajax call to finish before it returns?

I have a server side function that requires login. If the user is logged in the function will return 1 on success. If not, the function will return the login-page. I want to call the function using Ajax and jQuery. What I do is submit the request with an ordinary link, with a click-function applied on it. If the user is not logged in o...

How to modify ActiveXObject JS constructor?

I need to wrap an IE ajax request to notify me when it happens. ie i need to know when open is called on this: var xhr = new ActiveXObject("Microsoft.XMLHTTP"); The only way to do that(i think) is to implement the ActiveXObject constructor to proxy open calls to the real constructor/object. Can you help me do that? also: i dont need ...

Returning a PartialView with both HTML and JavaScript

I am making an AJAX call (with jQuery) to retrieve a PartialView. Along with the HTML I'd like to send back a JSON representation of the object the View is displaying. The crappy way that I've been using is embedding properties as hidden inputs in the HTML, which quickly becomes unwieldy and tightly couples far too much stuff. I could j...

Usage of ICEFaces push technology

We are looking at/investigating the possible usage of ICEFaces AJAX push technology. Wondering if anyone has used this? What issues they faced? And overall impression of it. We are using Websphere 6.1 application server - has any one who has implemented this implemented it on Websphere. We are trying to address an issue on our site i...

.net ajax and jquery tree

I need to save a jquery tree in the database. i am using .net web forms, c#. From what I hear, I need to use AJAX to collect the data on the client, package it up, and send it to the server method. WHat are the details involved? If anyone has a simple working example, please share. ...

One user control updating another during AJAX Postback?

I developed a user control that displays a list of products and it works pretty good. Then I dropped this user control into another user control that allows the user to pick different criteria and the product UC updates to show those products, all pretty slick and with AJAX via UpdatePanel. All was working just fine... then another req...

Mailing Address Verification, Etc. Get County from Zip

It seems fairly common today for websites to perform some address verification behind the scenes. For example, the 4 digit extension on zip codes is commonly filled in. In addition to filling in the 4 digit zip code extension, I would like to know what county the address belongs to. This will be utilized in an ASP.NET 3.5 application ...

How to use onLoading event in grails remoteFunction

Hi, I am doing a web application in grails.In that I am using remoteFunction in gsp page.It is working now.In that in "onloading" event I want to call "showSpinner()" javascript function.My sample gsp code is : <div class="menuButton" onclick="${remoteFunction(action: 'index', controller: 'file', update: [success: 'ajax', failure: '...

Ajax request and text/xml

I am requesting and xml file over ajax, the server uses the header text/xml for the data returned. Firefox reads this header and turns the data into an XMLDocument object which means I can't use it with jQuery. How can I get my XML document as plain text? ...

Scala lift framework, ajax form that submits multiple values?

I am just getting started with lift and I am now trying to change a normal form to an ajax form but the method processEntryAdd is never called. def addUser(xhtml : Group) : NodeSeq = { var firstName = "" var lastName = "" def processEntryAdd() { Log.info("processEntryAdd: " + firstName + ", " + lastName) } ...

Issue with Ajax.ActionLink incorrectly rendering links when using htmlAttributes.

Does anyone know of any issues with rendering incorrect querystrings when using htmlAttributes in an Ajax.ActionLink? It seems that if I put even an empty array in for the htmlAttributes, the link gets rendered incorrectly. Here's my code. When I do this (note the new { }): <%= Ajax.ActionLink("Delete", "Delete", "Milestone", new Rou...

How to open a file using JavaScript?

I have a servlet that write a pdf file as a ByteArrayOutputStream to the servlet's output stream. If I open the servlet URL the browser opens the file. But if occur an error on the servlet, the browser opens an empty pdf with an error message. Sending an error through the ServletResponse the browser opens the default error page. I want ...

How do I get Ajax form submissions to work in ASP.net MVC?

I'm very new to the AJAX and Javascript world and I'm trying to implement Scott Hanselman's example of form submission to update part of a page. I have copied his example almost word-for-word and I can't seem to get it to work. When I click the submit button the controller action is called successfully but the result is rendered in the b...

Basic AJAX example with ASP.NET MVC?

I'm in the process of making a demo ASP.NET MVC app for educational purposes. I have an image/link that flags a post as offensive. I would like to request from the server via AJAX to flag offensive and check to make sure that the user has this ability. If the user does, then I want to flag the post as offensive in the database and r...

How can you imitate pushing data to a web application?

Obviously, you can't push data to a web application, as HTTP works in a request-response cycle. But what hacks/methods do you know of that can imitate pushing data to a client? ...