ajax

DataContractJsonSerializer changing my date

A user enters a date in a form, but when I pass a date through an AJAX json call, my date is getting changed by the DataContractJsonSerializer. Here's my AJAX call: function Save() { //Convert date to milliseconds from from 1/1/1970 - necessary for passing a date through JSON var d = "09/01/2010 05:00"; myDate = new Date(d)...

Logout through XMLHTTPRequest Object is not working in Opera

I am using the basic authentication mechanism for my website in IIS. To logout the user I am using something similar to this JavaScript function: function logoutUser() { setTimeout('location.reload(true)', 1000); xmlhttp = GetXmlHttpObject(); if (xmlhttp==null) { return; } //alert(xmlhttp); var url = "index.php"; xml...

What kind of security threat i could face using web services?

In regards to my this question, I got this following answer to add this to the web config file. And it also resolved the issue i was facing. But now my question is that is there any kind of security threat? if yes, how severe it could be? what kind of threat it could be? Do you suggest something else here. <configuration> <system.we...

JQuery ajax request inside a function: how to return the value I got?

Hello! I want to write a javascript function, that will make an ajax request to PHP script and returns it's result. That's how it looks: function myjsfunc(some_data) { $.post( "/myscript.php", { some_data: some_data }, function(response) { result = response; ...

Maintain View State After POST

I am creating a site that utilizes the jQuery UI tabs. Whenever the user flips between the tabs, the tab they just left is posted back to the server in order to save the state. One of the tabs in particular is a bit complicated in that, if I select a particular data option, other options need to be disabled. However, because of the POST...

jquery passing control id into inner method

I am making ajax call(ASP.NET 3.5) from dropdown change handler and trying to pass dropdown id into ajax call: $('select.facility').change(function() { if ($(this).val() != 0) { var params = new Object(); params.facilityId = $(this).val(); $.ajax( { typ...

JQuery and Rails 3 ajax:failure callback

I'm using Rails 3 and JQuery 1.4.2 and am trying to bind to the ajax:failure callback on a given remote form submission. The callback works fine, however, the xhr variable that's passed back seems to lose the responseText attribute somehow. Here's what my code looks like: _form.html.haml = form_for(object, :remote => true) do |f| = ...

how to use AJAX to fetch content

I need to do a fetch using ajax. I need to use this: ajax/get_item_list/*group_id*/offset/*limit*/true (return true as JSON) where id comes from a link that user clicks. And when user clicks that link, it should call(?) that "ajax/get_item_list/*group_id*/offset/*limit*/tru" to get content to a div. And when user clicks another link (in...

Date changed to local time when being passed using JSON

I have a page that displays data from an object. I'm loading the object server side, and passing the results through an AJAX call with json. There is a date property that is part of the object. For some reason, the date is being changed. It looks like it is trying to take into account the timezone I'm in and subtracting 4 hours from the ...

ASP.NET Ajax CalendarExtender will not update SelectedDate value

For some reason, any CalendarExtenders on an ASP.NET site that is being worked on will not be updated. I have already checked all the obvious places (such as AutoPostBack and AutoEventHandler). The problem is that when I select a date from the Calendar and post it to the form, the TextBox that is being extended IS being updated, but the ...

Mootools cross domain, YQL proxy

Hello, I've been trying to make ajax cross domain scripting with YQL as proxy. It works great, but can i somehow change the data format? Im trying to extend the JSONP class like this: http://fragged.org/cross-domain-ajax-calls-via-yql-as-proxy-and-mootools-jsonp_1028.html And im getting data as text/html, but would like it to be as xm...

jQuery AJAX call to WCF service with custom principal.

I have successfully created a WCF service using the webHttpBinding with no authentication or security. I can call my function over and over and it returns the value as expected. Now I created a custom IAuthorizationPolicy, UserNamePasswordValidator and IPrincipal. I went back to wsHttpBinding (default) and did a normal service refer...

Where is the JSON Results from my jQuery AJAX POST Call?

I have this code setup in a web page. <div id="gridResults"> </div> <script type="text/ecmascript"> jQuery.ajax({ url: "http://localhost:6002/AggregateServices.svc/incident/10", type: "POST", async: true, success: function(json) { var table = jQuery('<table />'...

CakePHP: Controller Response for Ajax Request is wrong

Hi, I'm using jQuery to make an AJAX request to some controller action. This request is activated from a button in the view of the edit action in the same controller. My problem: The Ajax Request is returning all the code of the edit view (with all the forms and inputs) instead of the expected number. If I put the same ajax button in ...

Ajax Accordion control is not working.

Thank you for all the replies. This is my source code.. asp:Accordion ID="sample_accordion1" CssClass="accordion" HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent" runat="server" ...

jHTMLArea locks up inside jQuery webform wizard

Hello, I previously posted this question http://stackoverflow.com/questions/1704933/jwysiwyg-or-jhtmlarea-within-a-jquery-ui-tab about getting jHtmlArea to work inside jQuery Ui tabs. I am now trying to get this same html editor to work inside the jQuery formtowizard plugin. I am not sure if this is exactly the same problem or not. No...

How to return xml data to jquery ajax call from webservice

This is my ajax call to webservice -JsonWebService.asmx file $.ajax({ type: "POST", async: false, url: "/blkseek2/JsonWebService.asmx/GetList", data: keyword2, contentType: "application/xml; charset=utf-8", success: ...

prototypejs: How do I reattach event handlers etc to html returned in an ajax request?

Hi guys at times I return large chunks of HTML in ajax requests. However I notice that they don't come with all the prototype extensions applied to them at all. How can I set up so after an ajax request all my returned code has all the attached functions and properties which prototype applies to all DOM elements upon page load. ...

BOUNDARY in sending the file data using the HTTP ?

I read some articles on net for sending the files using HTTP/(Ajax). While reading i found stuff like need to set BOUNDARY for the file etc. I don't understand what and why is this ? Can some one please help me understand this. ...

Javascript wait for function response

I have the following code: myFunc(); bar(); myFunc() is making an ajax request I don't want to execute bar() until myFunc()'s request has completed. I also do not want to move the call to bar() inside of myFunc. possible? EDIT Here is the code I ended up with: var FOO = { init: function(blah) { // Callbacks to pass to the AJ...