jquery-ajax

JQuery Ajax Voting

I am using this JQuery Ajax Voting system guide as a rough reference but I am a little troubled at the security of this. Right now this guide basically stores the ID of something and the vote statistics for it. I'd like to go off a similar idea but I need to include the userID as well so a user can only vote once. This is stored in a PH...

Submitting AjaxForm with jQuery in ASP.NET MVC

I have an ajax form in asp.net mvc which is as simple as this: <div class="panel" id="blogPostPanel"> <img src="/images/ajax-loader.gif" alt="ajax-loader" /> </div% } %> I want to invoke the form submit when document is loaded. This should supposedly, call the controller's action and return a result that should...

Jquery ambiguous ajax error

This is the gut of my ajax call. function ajax(path, requestData, successCallBack, errorCallBack) { return $.ajax({ error: function(xhr, textStatus, errorThrown) ç(xhr, textStatus, errorThrown); }, success: function(json){ successCallBack(json); } }); } When there is an...

Dom problem within AJAX request

I have been stuck on this problem for almost 2 days now, consider the following code: '.country-select' occurs twice in the form ( input), $('.branch-row').hide(); $('.country-select').change(function(){ console.log($(this)); country_select = $(this); $.get('get_country_branches.php', 'country=' + $("'#" + country_s...

dynamicaly loaded js function does not appear in firebug js debugger

Hi. There is a page1.html (I open it in browser): <div id="content"> </div> <script type="text/JavaScript"> jQuery.ajax({ type : "GET", url : 'page2.html', dataType : "html", success : function(response) { jQuery('#content').append(response); } }); </script> Code of the page2.html: <script...

Asp.net jquery post to ascx: This type of page is not served

Hi, When I'm trying to call an ascx with Jquery post I get: "This type of page is not served" I think it's something to do with the IIS not allowing calls directly to ascx. Is it possible to allow posting to ascx? I have IIS6. Thanks. ...

jQuery - can't set css propery in ajax callback function

I'm trying to get an jquery ajax callback function to update the background colour of a table cell, but I can't get it to work. I have the following code (which produces no errors in Firebug): $(".tariffdate").click(function () { var property_id = $('#property_id').attr("value"); var tariff_id = $('#tariff_id').attr("value"); ...

Using PageMethods with jQuery

Simply put I want to call public static methods decorated with WebMethod attribute inside my code-behind C# file from jquery.ajax to get some json and other simple stuff (in different functions). But instead I'm getting whole page :'( I'm not using asp.net AJAX though I'm developing for .NET 3.5 framework and using VS 2008. (There are s...

Jquery and ajax - using a link to inject a files content

I'm looking to achieve the following. I have an initially-empty absolutely positioned div (#description) sitting on TOP of another div (#zoom) which gets large images injected into it when users select one of the 15 or so thumbnails on the side of the page. I have a link on the side such as: <div id="whatisit"><a href="description.php"...

how to pass xml as parameter using POST method and using jquery ajax

I am using jQuery + ajax to post data to the server and facing issues when xml string is passed. I want to pass xml string eg., "<test></test>" as a parameter to the ajax function using POST method. i am able to pass all other types, but not xml string. Can somebody pls help me on this? ...

How to access xml text node in Jquery

Suppose I get the following XML structure: <root> <item> <item1>text1</item1> <item2>text2</item2> more text here </item> </root> "more text here" is a text node that is at the same level as the other data nodes in the hierarchy but it does not seem to be accessible. Is there a way of extracting the text node shown above using jQu...

Jquery: ajaxSend & ajaxStop events not working?

Hi ... can't seem to get the ajaxSend and Stop to work... These are global variables no? .. but i should be able to use like this... but i never get an alert?? I wanted to use these events to display a ajax animation.. although in my code i wish to position the ajax animation depending what i am doing an what element it is.. ...

How to execute both the local as the global ajax events in jQuery?

Recently making the switch from Prototype to jQuery, I am struggling with some basic issues. I use several AJAX-requests in my application; for 95% of these requests, I'd like to have some global events executed, such as showing or hiding a loading indicator. Apart from the global functionality, every request should also have some custo...

jquery sortable in cakephp, stuck at ajax part

Hi, I used to use scriptaculous in all my cakephp projects because of its easy helpers. In time, i got more and more into jquery and now I want to replace my current scriptaculous script with jquery. Until now > everything is good. Except jquery sortable. Jquery sortable runs, but the ajax call after isn't working right. Now my program...

How to make update panel in ASP.NET MVC

Hi Guys i make search about how to make update panel in MVC ,but , because it is new , i cannot find good samples regarding it.How can i implement this to MVC? Thanks ...

asp.net - How can I update a text box asynchronously during a long process.

I'm using MS Ajax toolkit and would like to be able to display status messages back to my user asynchronously. I have an update panel wrapped around a text box, this is the desired destination for any update message. Inside the update panel I have a trigger pointing to the click event of the only button on the page. I'm able to make th...

Show only one Ajax Indicator in a Page with a lot of them

I have a lot of Ajax indicators in a Page. Now I use $(document).ajaxStart(function() { $('#ajaxBusyIndicator_<%=partido.PartidoId.ToString()%>').css({ display: "inline" }); }).ajaxStop(function() { $('#ajaxBusyIndicator_<%=partido.PartidoId.ToString()%>').hide(); }); The problem with this is that I ge...

Apart from UI "flair", what do you use jQuery for?

From an ASP.NET MVC perspective, what do you use jQuery for? Apart from UI "flair" - things like fading colours and pretty animations. Things I can immediately think of include pop-up calendars and modal popup dialogs, but there must be more... Edit I am interested in jQuery uses for things that ASP.NET MVC does not do out of the box...

How to execute javascript inside a script tag returned by an ajax response

I'm sending a jquery get request like so: $.get($(this).attr("href"), $(this).serialize(), null, "script"); The response I expect to receive will be wrapped in script tags. I understand the browser doesn't execute the response unless its returned without the script tags. Normally I would remove the tags from the response but in this ...

Using jQuery and JSON with AJAX responseText?

Ok, I'm a bit new when it comes to jQuery and json. If I'm using json as my return type, can I still retrieve responseText from an XMLHttpRequest object? here's the code that i'm using: json response: {"clients": []} $.ajax({ type: "POST", url: "/myurl/whatever.php", data: myData, dataType: "json", ...