jquery-ajax

Loading multiple views from codeigniter using jquery

<script type="text/javascript"> $(document).ready(function() { $('a.menuitem').click(function() { var link = $(this), url = link.attr("href"); var newDiv = '<div></div>'; $("#content_pane").append(newDiv); newDiv.load(url); ...

ASP.NET MVC with jQuery

Hi, I'm currently attempting to retrieve a list of objects from my database using jQuery. I have been attempting to use getJSON but the callback is never fired. However, if I use $.post(url, data, callback) ... then it seems to fire just fine. My controller actions is thus: public ActionResult GetTemplates() { IEnumerable<Temp...

jQuery AJAX Load Content Problem

I have a XHTML Strict Website 'main.php' with a normal Header where jQuery and other Scripts are loaded - also there's a menu: <div id="tab"> <ul> <li><a href="#" onclick="content('load/feed.php');"><img src="feed_active.png" width="16" height="16" alt="Feed" /></a></li> <li><a href="#" onclick="content('load/feed2.php');">...

jquery load returns empty, possible MVC 2 problem?

I have a site that need to get some data from a different sit that is using asp.net MVC/ The data to get loaded is from these pages: http://charity.hondaclassic.com/home/totaldonations http://charity.hondaclassic.com/Home/CharityList This should be a no brainer but for some reason I get an empty response, here is my JS: <script> ...

jquery - dynamically fill fields with json based on property name

asp.net mvc model object is being fetched by ajax call - $.ajax(.... form has fields with IDs exactly to matching properties on returned json object (created by Html.TextBox("NAME", Model.Order.NAME) ) How to automatically populate fields(inputs) with corresponding json object properties ? Manually would be like $("#NAME).val(json.NAM...

Parsing XML Using JQuery

There have been a lot of other posts related to this but I can't seem to find the answer to my question. I'm trying to parse an XML file of the following form to return only the items under the 'subGroup' node. Here is the sample XML: <?xml version="1.0" ?> <resultsGroup> <item> <id></id> <title></title> <descriptio...

ASP.NET Ajax string format help please

Hi All, I have the following javascript code and I am not getting the result I want. I am trying to format a string using String.format(format, args) like c# works. I have var claimNum = $("#ctl00_DefaultContent_txtClaimNumber").val(); var claimant = $("#ctl00_DefaultContent_lblClaimClaimant").text(); var param...

Why do I get a 403 forbidden when calling to external IIS based MVC controller returning a JSON result

I have an application that's been provided by a third party. The only means of modifying the behavior is through client side script. I have a screen in the app that does some ad-hoc querying but doesn't provide any means by which to save the settings. Rather than have the user re-enter setting each time, I've injected some elements vi...

Internet Explorer not rendering html returned from JQuery ajax post

I have a page with an input box whose onkeyup fires a JQuery ajax post based on what was typed (a search field) The ajax call's posted back html is supposed to populate another div on the page. Here is the jquery ajax post: var o = $(me.results).empty().addClass("aj3load"); $.ajax({ type: "POST", dataType: "text", url: me.url, ...

Change contentType when calling jQuery.ajaxSubmit

I have an ASP.NET MVC form that has a standard Submit button it and also a Preview button (so the user can see what an outgoing email will look like prior to actually sending it). The issue I'm running into is that the form allows users to upload files that will be sent with the outgoing email. I would like the Preview button to only g...

creating sortable portfolio with jquery

I have created the layout for my new portfolio webpage here: http://vitaminjdesign.com/work.html I want to have a legend with tags (ALL, logo design, marketing, web design, print design) and when these tags are clicked, the page filters the results and display them like they are currently displayed. At first, I want ALL projects displa...

Variable scope with JQuery

I have a Javascript object which has a jquery ajax call to server to fill one of its attributes: function Busqueda(contenedor){ var datosPost = "someData"; var resultados = undefined; var that = this; this.buscar = function(){ jQuery.ajax({ type: "POST", dataType: "json", ur...

Jquery filter script help

Hello- I am using a filter script and I am trying to alter the jquery a bit. (see demo here: http://www.askthecssguy.com/2009/03/checkbox%5Ffilters%5Fwith%5Fjquery%5F1.html) Now that you've seen the demo, you know that once you uncheck a box, it filters out the results with those tags in it. For instance if you deselect the "wordpres...

Jquery - Publish and Subscribe?

Hi there, Is there such a thing as publish and subscribe for use with jquery to send msgs from 1 javascript page to another.. Using the same idea behind ajax publish and subscribe? I would like to use the pattern for communication between pages, i have been using a javascript framework lately but recently converted back to jquery and w...

delay the showing of a ajax loading gif using jQuery

What is the best way to put a delay on the showing of a ajax-loader gif. When I click a button the loader gif shows and hides even if the time taken is a few hundred milli-seconds, this gives the browser a kind of flicker. What I want is to say only show the gif if it takes more than say 1000 milli-seconds to complete the ajax request. ...

using jQuery AJAX with asp.net webservices always goes to error: instead of success:

Issue I have an aspx page with jQuery code to send an ajax request over to an asmx web service file (on the same website). The response that comes back is not consistent, however, it consistently fires the "error" jQuery callback as opposed to the "success" call back. The status code inconsistently varies between 200, 12030, and 12031. ...

Cannot populate form with ajax and populate jquery plugin

I'm trying to populate a form with jquery's populate plugin, but using $.ajax The idea is to retrieve data from my database according to the id in the links (ex of link: get_result_edit.php?id=34), reformulate it to json, return it to my page and fill up the form up with the populate plugin. But somehow i cannot get it to work. Any idea...

How to cache a jquery Ajax request and parsing

I'm building an application that is an image gallery but with lots of images (it's for browsing archives of documents); basically the application does this: display an image display "previous" and "next" links left and right of the first image The previous and next links are retrieved from an XML file that lists all images in sequenc...

JavaScript JQuery Ajax Issue: POST Works fine in Firefox, IE, Safari but not Chrome.

I'm new to JavaScript, and working on a hobby project with a few developers. We have a simple page that is used to submit requests to a database. I decided to try learning JQuery, and started implementing some AJAX functionality into this request page. It works fine in FireFox, IE and Safari, but for some odd reason, I can't get it to w...

Javascript error....

Error: invalid regular expression flag b Source File: http://localhost/media/javascript/global.js Line: 4, Column: 19 Source Code: url: /home/blog, $("#blog").click(function () { var url = $(this).attr("href"); $.ajax ({ url: /home/blog, type: "POST", success : function (html) { $("#someDiv").appe...