ajax

use odata or MVC to return json?

Hi I am trying to use ajax to do CRUD. Should I use ODATA or MVC? i am also planning to use json in mobile platform as well. Thanks guys ...

Return a value from an jQuery ajax function

Hi, I know there are a lot of questions regarding this but none of them seem to answer my particular question. I'm having trouble constructing a function that includes an ajax call then returns a value. I am currently using: hmis_query_temp_scalar: function(query_name) { return $.ajax({ url: '/php_scripts/query_...

Ajax - How Do I Populate a Hidden Field?

Hi. I'm new to Ajax. I'd like to populate a hidden field on a form with a responseText from the server. I'm able to display the responseText in the HTML as an innerHTML. I'm just unsure how to populate the hidden field on the form. Any suggestions will be greatly appreciated! :) Here's the JS: function getLocation(locationroutin...

How to make Google crawlable AJAX pagination in .NET

I have searched a lot and have found enough about it but I am unable to apply it. I have an Ajaxhandler to request as: ..test.ashx?pagenumber=1 And I want to make it crawlable. ...

Small AJAX Javascript Library

Hi! I'm looking for a very small (one liner) ajax javascript library to add on the first line of a small script to make some requests. I already tried: http://www.openjs.com/scripts/jx/ http://code.google.com/p/microajax/ But they do not work at all. Alternatives? ...

AJAX onclick on fires once, error thereafter

I am using Highcharts (http://highcharts.com) and attempting to display a colorbox (http://colorpowered.com/colorbox/) when I click a bar chart column. Highcharts allows attaching a method that gets called on click (Highcharts docs). This works great for something as simple as calling an alert, or providing static HTML to the colorbox, ...

Using Ajax to call code-behind function?

I have a java-script function that displays options on a web page and a C# function that stores preferences in a database. I need some way for said java-script to also execute my C# function. I think this is possible with AJAX, but I am not entirely sure (I've never used AJAX before). I've read some tutorials (w3schools), however none...

How to parse AJAX response without loading resources?

Hi there! I load a bunch of HTML from the server containing img-tags. I need to parse this response (I need only a small part of it) and find a few particular tags. Problem is, as soon as I throw the response into jQuery to parse it, the browser loads all contained images. This is partly unnecessary (I don't need most of them), but the...

Dynamically adding items to a select list in Ruby On Rails using Ajax

I have looked at a whole bunch of solutions for this and maybe I am just dense, but I can't get anything to work. These are the two selects I am trying to tie together in a product/new view that will allow the user to select a category of product and then constrain the subcategory listing: <p> <%= f.label :category_id %>: <%= f...

Proxifying ASP.NET page in PHP causes AJAX error.

Hello, I'm working on building a PHP based proxy script to access a particular ASP.NET page that uses lots of AJAX. So far most of the website works, but one of the forms produces the following error upon submittal: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common ...

jquery click event doesn't work on a div loaded with ajax

I have an jquery script using .ajax that loads a new div containing the replied information. Part of the contents of that div is a link that says remove. When remove is clicked I want the parent div to hide. This doesn't seem to work. $(document).ready(function(){ $('.remove').click(function() { $('.remove').parent().hide(); }...

.ajax getting returned an empty string.

Hi, I'm having some difficulty getting my $.ajax to work correctly. The function is getting called however it is returning an empty string. I'm fairly new to using $.ajax so I appologize if this is easy. The program works when I run it w/o javascript it just loads a new page with the output. Thanks Here is the .js $(document).ready...

How to replace a an entire page in jQTouch with another

I have been trying to replace the contents of a page using jQTouch to no success. My problem is related to this question $('div.current').replaceAll(html) When I try to do that, the entire page disappears. Does anyone have a solution for this? ...

Jquery, JSON, PHP and GMaps

Hi all, I am turning in circles and are hoping for some clarification by you guys ... 1) I have a site, using jquery and a Goolge Maps Plugin (http://plugins.jquery.com/project/gmap). This all works perfectly and I get my markers set right and I really like this solution. This is how it looks like: <script type="text/javascript" src...

Can you fire an event in JavaScript before the user closes the window?

I want to send a ping to my server using an AJAX GET or POST, right after they close the window. Is window.onbeforeunload a good idea? ...

Getting error with $.ajax when tried to fetch JSON object from Google map api.

Hi, I am trying to get json from google map api using ajax and jquery. The code is something like url: "('http://maps.google.com/maps/api/geocode/json?address=559/1,+9th cross+7th main+Gokula,+1st stage+bangalore,+Karnataka,+India&sensor=false')", type: "POST", dataType: "jsonp", success: function(longlatJson) { ...

jQuery ajax requests: Success functions called in sequence of request

We have a jQuery app where some requests for the same URL may take much longer than others. The user fires off ajax posts (by making a change in the UI), these fire off a get request on success that updates the UI. When the earliest of the get requests takes a long time, the later one (which is much quicker) is delayed until the slower o...

JSF 2 - f:ajax tag doesn't work

I have a problem with f:ajax tag. In my previous project, everything worked perfectly. Now I have another project and f:ajax tag doesn't work at all and I don't know why. I have this in JSF page with Facelets: <h:form> ... <h:selectOneMenu id="employeeId" value="#{employeeBean.employeeId}"> <f:selectItems value="#{employeeB...

JavaScript - AJAX : Accessing an XML File from a Server

Hi, I am trying to access an XML file from a server in my javascript code. I have an XML file like this: -<stream version="1.2"> -<room id="simulator" time="128168557915"> -<dimention id=0 x="1.25" y="2.00"> <m mcu="160" sid="75"> </dimention> </room> -<room id="simulator" time="128168557928"> -<dimention id=0 x="1....

Calling PHP script with ajax and jQuery

Right now I have this: echo "<a href='misc/removeWallComment.php?id=" . $displayWall['id'] . "&uID" . $displayWall['uID'] . "&BuID" . $displayWall['BuID'] . "' title='ta bort inlägg'> <span class='removeWallComment'></span> </a>"; Its an icon with a link that removes the comment when you click. Now, it goes to misc/rem...