ajax

.NET website: Get the output of .ascx from jQuery

In MVC .NET application we can easily use PartialView to print the output of an ASCX file. For example, I have Book.ascx file, I could have this in the controller public ActionResult Book(int id) { BookModel model = new BookModel() { bookId = id }; return PartialView("Book", model); } which returns the output of Book.ascx Is the...

How to avoid ajax request flooding in django

Hi everyone, In django I made a simple ajax handler that will validate a POST request and on success write to a database -- which will later be available to be seen publicly. Anonymous in this case is allowed. Much like StackOverFlow will accept questions posted by logged in and non logged in user, we'd have similar acceptance. How d...

iPhone browser/IIS/Tomcat, Japanese locale, http parameters getting messed

First the environment: the client is a mobile Safari on iPhone, the server consists of a Tomcat 5.5 fronted by IIS. I have a piece of javascript code that sends a single parameter to the server and gets back some response: var url = "/abc/ABCServlet"; var paramsString = "name=SomeName" xmlhttpobj = getXmlHttpObject(); //Browser specifi...

jQuery ajax post to web service

$(document).ready(function() { $.ajax({ type: "POST", url: "/getprojects.ashx", data: "<formData client=\"\" year=\"\" categories=\"\" tags=\"\" freeText=\"\" count=\"34\" page=\"1\"></formData>", dataType: "text/xml", cache: false, ...

jQuery how to find button values on form submit.

I have a basic newsletter signup form with an email field and two buttons (subscribe and unsubscribe). I want to submit the button value as part of the ajax data but .serialize() does not include button values since they are specific to an event. Here is my code: Javascript: $('#newsletter_form').submit(function() { $.ajax({ ...

Tomcat and Ajax Issues

Hello, it's really the first time for me to post. I'am encountering a problem with my Web Apps and cannot find any answers on the web. My problem is that i have a Java Web App that works on parallel with tomcat and apache using mod_jk. Everything works fine, but after one day of running in tomcat, the Ajax request i do with Jquery dos...

calling function on hyperlink onclick event in php

Hi there, can anybody help me here please? I am using AJAX for pagination in my application. So I am generating hyperlinks with for loop. as follow: for($t=1; $t<=$hf; $t++) { if($t == $_GET['pageno']) { echo $t." "; } else { echo "<a id ='$t' href='javascript:void(0)' onclick='open_page('ajaxinfo....

Updating Panels asynchronously_

I want to update panels ( panel1 and panel2) asynchronously. However when the page loads, if i try to edit a row and update it, panel1's RequiredFieldValidator gives an error message * and row's update link does not work!. After adding a company from panel1, update link starts to work. How can i solve the problem? <asp:UpdatePane...

Dynamically added AJAX content with wrong markup

i am using jQuery to dynamically add content $("#articles").prepend('<article><header><p>info</p><h2>You are using Internet Explorer</h2></header><p>It is recommended that you use a modern browser like Firefox, Chrome or install Google Chrome Frame to experience better performance and advanced HTML5 and CSS3 features.</p></article>'); ...

Difference Between request.status and request.statusCode

Hi, I am learning AJAX and I wanna know the difference between the request.status and request.statusCode functions. for example: document.getElementById('erroDv').innerHTML = request.status; document.getElementById('erroDv').innerHTML = request.statusCode; Thanks in advance! Dwarak ...

JQuery ajax function works but can't return the variable correctly

Hi all, I have a function runAjax that functions correctly. Unfortunately I am struggling to return the value I get from the ajax query. The ajax function assigns the returned value inside "contents" or "error" xml tags to the variable "result". If I alert the result variable inside the ajax function it alerts the correct value (i....

Zend Framework, JQuery, AJAX with Zend_Layout

Greetings, So, I am using the JQuery tab container (with only 2 tabs) on admin/index/index. The 2nd Tab Pane's content is supplied by an ajax call due to the contentURL I supplied in the params. contentURL points to a controller/action that outputs other JQuery widgets in that view script. (Another tab container, and accordion Contai...

Chrome: Disable same origin policy

Is there a way to disable the same origin policy on Google's Chrome browser? This is strictly for development, not production, use. ...

Javascript autosubmit form

I have a form that I need to submit automatically... (the fields are already filled and its complicated to explain why but it IS necessary to do it this way).. I know how to autosubmit the form using Javascript but the only problem I have is that there is more than 1 submit button.. and I need 1 in particular to be submitted... thanks in...

Why are Google API queries through simplejson returning "responseData": null?

I'm trying to screenscrape the first result of a Google search using Python and simplejson, but I can't access the search results the way that many examples online demonstrate. Here's a snippet: url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;%s' % (query) search_results = urllib.urlopen(url) json = simplejson.load(...

Problem in algorithm with jquery.ajax in cycle

Hello everybody. I want to make some ajax requests in cycle with jquery.ajax method. And I must handle the link request id(some information passed to server) -> server response after all requests done. And so on I have not any information about request id in server response. How could I handle this? May be handle request data in callbac...

Remove cookie from XMLHttpRequest object

I am making an ajax call with jquery like: $.ajax({ url: "path/to/webservice.asmx" beforeSend: function(xmlHTTPRequest) { //modify headers here //remove cookies } success: function() { //do stuff } } What I would like to do in the beforeSend function is take the incoming xmlHTTPRequest varia...

rich:fileUpload -- Nothing happening?

I'm trying to use RichFaces <rich:fileUpload> component (with Seam as the overall framework) to upload a series of files. However, when I click the "Add" button nothing happens. Absolutely nothing. I'm not prompted with an open dialog or anything. I have a JSF page with an , and inside of that form I have: <rich:fileUpload allowFlas...

Postback when session Expires in Ajax call

On one of my pages I have a div that uses ajax to load content asyncrohnously. When a session expires the user is supposed to be redirected back to the loggin screen. However, when the session expires and the ajax call is triggered the login page gets put inside the div. What I want is for the user to be redirected back to the login scre...

How to set up Ajax with Struts 2?

According to articles like: http://www.oreillynet.com/onjava/blog/2007/06/easy_ajax_with_struts_2.html and http://www.firstpartners.net/kb/index.php/Easy_Ajax_using_Struts_2 it should be easy (out of the box) to use Ajax with Struts 2, but all of the examples leave out details. Does anyone know of any tutorials that include all t...