jquery-ajax

ASP.NET MVC and jQuery - Problem with ajax encoding

Hi everyone! I'm using this to save some data to DB: $("#btnSave").click(function() { $.ajax({ type: 'POST', contentType: "application/x-www-form-urlencoded; charset=UTF-8", data: 'description=' + oEditor.GetXHTML(), url: '/SuperAdmin/ReceiveData/', success: function()...

Prepending and animating text loaded via AJAX with jQuery.

Old hand with Prototype, new to jQuery, and writing a simple app to get a feel for the framework (and because I want to use it). I've got an HTML fragment that I load via AJAX, and I want to stick this at the top of a div, with a slide-in transition animation. This bit works, and does the prepending bit: // Get the HTML fragment and s...

Post an array of complex objects with JSON, JQuery to ASP.NET MVC Controller

I know this issue has been touched on before eg here But the solutions doesn't seem to fit my problem. Here is my html. The number of rows are variable <table id="workPlanTable"> <tr> <th> Begin </th> <th> End </th> </tr> <tr itemId="1"> <td><input class="begin" id="begin_1" name="beg...

Can't focus input field in DOM loaded with ajax call

I have gone insane trying to figure out how to make this work. Code looks roughly like: function onDropDownChanged() { $("#updatePanel").load( "myUrl", { id: $("#myDropDown option:selected").val() }, onPanelLoaded ); } function onPanelLoaded() { $("#theTextInput").focus(); } $(document).ready(function() { $("#myDropD...

Promote callback onSuccess return value to the Caller Function return value

I have a javascript function that calls a generic function to make an ajax call to the server. I need to retrieve a result (true/false) from the callback function of the ajax call, but the result I get is always 'undefined'. A super-simplified version of the generic function without all my logic would be: function CallServer(urlContro...

How to select and replace the whole page with jQuery

My design of a page forces me to refresh the whole page with html that I have loaded via ajax. $('html').replaceWith(data); Gives me errors. Any ideas? ...

jquery ajax post blocking form submit

Scenario: Within the onblur event of a html input control I send an async http post to a resource i.e. t.aspx. I do not care if it ever returns, however if the users clicks submit I want the form to submit. What I am seeing from using our simulators is that when I slow down t.aspx to take 10 seconds (page_load Thread.Sleep(10000)) when...

async ajax

Sequence of events within application is as follows: User lands on a HTTPHandler which creates or updates session data. Handler redirects user to Page1 As user fills in form onblur event is fired from a control and async ajax call is made to HTTPHandler which eventually calls WCF service gets data returns and updates Page1. When user ...

Ajax and gridviews

Hi, can any of you recommend a good ajax gridview for asp.net? I have looked at telriks, but 1000$ is a bit too expansive for my taste. I don't need a whole lot of features, but rather it to be fast. ...

AJAX Jquery UI Dialog window loaded within Ajax style Jquery UI Tabs

The ajax tabs work perfectly well. It's pretty straightforward with that part. However, getting the ajax UI Dialog modal window to trigger off of a link has been un-succesful. Any help in this would be appreciated. ...

Keeping a jQuery .getJSON() connection open and waiting while in body of a page?

I'm writing a basic push messaging system. A small change has caused it to stop workingly properly. Let me explain. In my original version, I was able to put the code in the of a document something like this: <head> ...text/javascript"> $(document).ready(function(){ $(document).ajaxStop(check4Updates); check4Updates(); ...

Are there any Ajax(Prototype or JQuery Plugin) sample for stackoverflow-like voting?

any good ajax samples for implementing voting similar to the up and down buttons of stackoverflow.com ...

Multiple Parameters with POST and MVC

Ok. So I have two elements on a page which are not located in a single form. I need these to be posted back to my controller via the JQuery.Ajax() method. Now the problem I have is that while my parameters do correctly post they only do so if I set them as strings and they include the parameter name in the value. So: Public ActionResult...

Show/hide fields depening on select value

Hello, I am trying to show and hide a few form fields dependent on the value of one of my select fields, I am looking to use arrays to to hold what should be show and what should not be show for each select value, to save me from a massive switch statement, but cannot figure out to do it. I am using PHP and jQuery. Any help would be g...

JQuery - Adding change event to dropdown

The underlying HTML for my drop down has a chance of changng and I was trying to set it up using the .live option rather than the .change option. Alas, it does not work for me. What I currently have is: $("#ItemsPerPage").change(function(e) { return updatePaging(); }); Unfortuantely, if I update this control via $.ajax it loses the ...

Trying to figure out how to make this rating system work

I am using the script found on this page. I downloaded the whole package found on the page and modified the url to the php file like this: $('#rate').rating('output.php', {maxvalue:5}); And in the output.php I have this. The author of the page says that the post will be calling rating. So that is why I'm using post rating. <?php if(...

Javascript Calendar - Jquery already used on the site.

A client uses yahoo calendars for his business. He is asking me to create a calendar to show the event updates he makes on Yahoo. I am using Jquery on the site already and would prefer to use it for this as well if possible. I see there is datepicker and such, but this needs to just display the Yahoo or Google (he said he would be ope...

Ajax Forms in CakePHP

Hi, I m developing a app in cakephp..I want to create Ajax Forms in it..Do i can make use of $ajax->form in Jquery to create forms..Suggest me.... ...

controller parameter NULL when using JQuery POST and ASP.NET MVC

I have no problems processing JQuery GET requests in a controller, however I cannot get any form data to POST. The following client snippet: $.post(url,{name:"John"},function(result){ //process result }); combined with a controller: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Save(string name) { return Json("Success!"); } w...

What is the best way to submit disabled inputs as part of a JQuery AJAX request?

I have a pretty complex form that provides real time validation and feedback to the user using it as they type in data. Parts of the form may be disabled due to form "business logic" of the inputs, but the server side needs to know the value of these disabled inputs to do some of its checking in the AJAX requests. I was using JQuery to...