ajax

Ajax form not working (jQuery - PHP)

jQuery: $("#contact-us-form").submit(function () { var nameVal = $("input[name=name]").val(); var companyVal = $("input[name=company]").val(); var titleVal = $("input[name=title]").val(); var emailVal = $("input[name=email]").val(); var phoneVal = $("input[name=phone]").val(); var messageVal = $("input[name=messa...

Using both versions of Ajax (1.0.61025 & 3.5.0.0) in a same SharePoint web application

Hello I'm working on a SharePoint web application. Since i can add web parts to the SharePoint pages i added two web parts A & B where A uses Ajax extensions 1.0 and B uses 3.5 version of it. If i enable Ajax in the web app i get the web.config entries for the both the versions of the dll System.Web.Extensions (1.0.61025.0 & 3.5.0.0) ...

how to remove row in table using ajax?

i fetch the result from database on click event of combo box now i am try to remove or delete value from database and also remove from table row.problem is, when i click on href the value is deleted from database and display fetched result no showing.pls guide ...

jquery form plugin: how to catch server errors

Hi I'm using the jquery.form plugin, it works except that I can't catch server errors. Even when I'm using the 'error' option, it doesn't seem to catch anything. For example, if the server returns a 500 error code, it will still says 200 code, which means 'Ok'. So I can't do handle the 500 response at all. What's happening? //Define a...

File export not working in Update Panel

Hello Everyone I am trying to export a file upon button click event. The structure of my app is like this. UpdatePanel TabContainer Tab1 UserControl (Button is in UserControl) Tab1 TabContainer I tried setting PostbackTrigger but it says control not found exception. Thanks in Advance ...

JS script running for every element, rather than simple clicked element

using jQuery, I am trying to get an action assigned to a button on a form. I have 50 of these forms on a page, but every time I click one link, the form action is run 50 time!! I ran this to check, and it comes to exactly 50 `i=1 $('.thumbs').click(function(){ console.log(i,"Click Count"); i++; )}; this has th...

Define URL to jump to a specific page element, height or anchor after ajax call.

I have a website running on wordpress and ajax. All the content ist loaded via ajax with deeplinking and hashHistory. URLs look like this: http://www.website.com/#/lang/page/ On one of the pages i want to implement multiple facebook like buttons to boost some of the contents popularity . To make this happen i need to specify dif...

post back when session expires in ajax call

On one of my pages I have a div that uses ajax to load content asyncrohnously. When a session expires the user is supposed to be redirected back to the loggin screen. However, when the session expires and the ajax call is triggered the login page gets put inside the div. What I want is for the user to be redirected back to the login scre...

AJAX enabled WCF service for cascading dropdown method 404 error

Hi, I am new to WCF issues and I'm trying to populate an control by using a wcf service . I have used 'Ajax-Enabled WCF' template ( VS 2010) for creating my service. there is no error while on Asp.net development server but when put on IIS [Method 404 Error] appears in dropdown . I tried to access the WCF services directly like (ht...

How to do a jQuery $.ajax or $.get request on a distant/other server? No Json or JSONP

Hello there, I'm working on a little widget that will allow to embed like an iframe (but with a jQuery plugin) a part of my website. I've successfully made a search.php API that produces in JSONP what I need to retrieve. It works! (thx to this community ;) ). I had difficulties to understand and use right callback request to allow a di...

Why do I have to enable and disable radiobuttons explicitly?

When I want to change the state of radiobuttons using AJAX, I discovered that it is necessary to set the state of each radiobutton explicitly, rather than just setting Checked = true on the one that you want to have enabled. If I remove the marked lines below, I can perhaps change the radiobuttons state once or twice using the buttons, b...

whats the best way to disable a link during ajax call . .

i have this code to show a loading image when i run an ajax call: $('.event').live('click', function () { var spinner = $("<img src='/content/images/ajax-loader.gif' />").insertAfter(this); the issue is that since its an async call, if you click a link multiple times, it will show up with multiple spinners. Obviously this is just...

Update Panel - Textbox TextChanged Event is interfering with the DropDown SelectedIndexChanged event

Basics: I have a text box (txtDepositAmount) that people can enter a deposit amount into and a drop down (ddlSelectedTerm) that sets the terms. Through these two values I calculate the APY (lblCurrentApy). Rules: If only one of the values is selected I still want to do an update on the current APY label and clear it. If either ...

ASP.NET MVC2 Multiple submit buttons, submit value null with FireFox and Chrome

I have a form with multiple submit buttons: using(Ajax.BeginForm("Submit", "myController", new AjaxOptions { HttpMethod = "Post" })) { %> <button type="submit" name="submitType" value="submit_a">a</button> <button type="submit" name="submitType" value="submit_b">b</button> <% } %> The controller method is as follows: [Authorize, Hand...

jQuery AJAX function can't see my variable

I have the following code, which i've simplified, where $currEl gets logged and displays correctly, but in the $.ajax call it logs as null. Am I missing something? for(var i=0, j = atgSlots.length; i < j; i++) { var currSlot = atgSlots[i].split('|'), $currEl = currSlot[0].length ? $('[data-atg-url=' + currSlot[0] + ']') : null, ...

'invalid label' error when returning JSON form rails controller when Firebug is closed

If I have Firebug console open, and return the following in a rails controller in response to an ajax call: format.json { render :json => Appointment.find_by_id(1) } I get an 'invalid label' error. But it works fine it Firebug is closed. Any ideas??? ...

Confirmbuttonextender popup issue!

Hello, I am trying to get a popup after saving some data into the database. When using the ConfirmButtonExtender and ModalPopupextender, it asks for TargetControlID. So i have given TargetcontrolID to be Submit button. So whenever the button is clicked, it shows the popup, after you close the popup, it saves information in the database....

HTTP POST and graceful degradation

I have a web application which among other things contains a table of items created using an Ajax callback. A bunch of form fields at the top of the table allow me to filter the items that will be displayed in the table according to various criteria and show it. Some parts of the table have lists of items with an [X] marked next to the...

Can ASP.NET MVC return a javascript response like Ruby on Rails can?

Hello. I'm diving into ASP.NET MVC and I'm coming from a Ruby on Rails background. I'm trying to understand how ASP MVC handles AJAX functionality and, after reading some of the tutorials on the ASP website, it appears they implement AJAX functionality very differently. One of the ways that RoR handles AJAX functionality is by returni...

rails asynchronous communication and xhr polling

I need to write a Rails application (JRuby) that does asynchronous communication with another service in the background. There needs to be one connection per browser session. (It does not really need to be a open TCP connection but I need to free resources after the session ends.) The communication with the background service is not stri...