ajax

jQuery's $() function always returns 'undefined' with AJAX

i've noticed that popup shows BEFORE text gets updated in the textbox, i guess js gets called before the page gets rendered ... that would explain the 'undefined' popup ... how do i make sure js gets called AFTER the page is rendered? rewriting to make it as simple as possible: <body> <form id="form1" runat="server"> <asp:ScriptMan...

Jquery and appending large amounts of html

I have come to find that using jquery to create html client-side can be a huge performance booster if done properly. I use ajax returning json to retrieve dynamic content and then I build the relevant html and insert it using jquery. The first time I messed with this technique I found that the string concatenator in IE's javascript per...

Getting all selected checkboxes in an array

So I have these checkboxes: <input type="checkbox" name="type" value="4" /> <input type="checkbox" name="type" value="3" /> <input type="checkbox" name="type" value="1" /> <input type="checkbox" name="type" value="5" /> And so on. There are about 6 of them and are hand-coded (i.e not fetched from a db) so they are likely to remain the...

UpdatePanel.Visible = true has no effect

Hi all There is a wide task. There is an update panel upDetails, which displays details table (initialy visible = false) when user selects any item from master table, we should set upDetails.Visible = true; But it soesn't work whatever place/event I had placed it - neither BL methods, neither pre-render. It still be invisible But when...

How to submit a complex form using Jquery's AJAX?

I'm trying to submit a form using Jquery's ajax. It has got a few textboxes, some checkboxes, and a multiple options' dropdown (i.e multiple options can be selected). Someone here told me that I can get values of all selected checkboxes using $("input:checkbox[name=type]:checked") Then I can loop through all the values returned by th...

What exactly is the point of the ScriptManager's EnablePartialRendering Attribute

Why would one want the EnablePartialRendering attribute to ever be "false" if building AJAX functionality into pages? Seems counter-productive. I've read here and there some things one may want to do with the attribute being false. But what I've read makes no sense. Thoughts? ...

How do you suppress IE7 ActiveX messages using javascript?

I'm trying to decide whether to use a custom ASP.Net Ajax Extender or jQuery to perform a simple web service call. The web service method accepts a customer ID and returns the customer name. I'm leaning towards jQuery because of it's simplicity. The only problem is that due to my company's IE7 Group Policy settings, the first time jQu...

How does an UpdatePanel actually work?

What is updated when an Update is triggered? What goes to the server? What comes back? I was under the impression that only the content of the panel was transmitted to the server and back (without touching anything in the page outside the panel), but I'm experiencing strange results, probably because I don't really understand how it wor...

The content is added and showed in the browser but jQuery can't see it.

I have a [WebMethod] that load an html snippet and add some content to it. That [WebMethod] is then injected into a page using $.post() and .html(). A piece of snippet: <p id="name"></p> The [WebMethod] add content to it: <p id="name">Joe</p> The snippet also contains a JavaScript code, like: alert($("#id").text()) The problem:...

How To: Use AJAX in an ASP.NET Custom Server Control

Does anyone know of a good tutorial that demonstrates using an existing AJAX control extender in a Custom ASP.NET Server Control? I do not want to build a "Custom AJAX Server Control". I want to build a Custom Server Control that uses an existing AJAX control extender. I would like to combine an asp:TextBox, asp:ImageButton, asp:Custo...

asp:UpdatePanel with an ASP.NET checkbox trigger

What is the EventName property when I set up a ASP.NET checkbox control as an async postback trigger for an asp.net update panel? ...

Can someone help me with an AJAX race condition that leaves buttons disabled?

I have an AJAX problem. There are some button on the ASP.NET page that I think gets disabled and re-enabled on a postback, which needs to be done for other reasons. There are 2 dropdown menus inside an updatepanel that will use the AJAX. The first dropdown menu updates the second one. There is a client side onblur on the first dropdo...

injection user control depending on radio button choice (ASP.NET MVC)

I have this Create Event form (asp.net mvc), and i have to change some parts of the form, depending on user's choice. When the user clicks radio buttons, different user controls (ascx files) should be injected inside the form hopefully using Ajax. Any suggestions to do this? ...

AJAX innerHTML. Change links. Possibly a " or ' problem.

What I want is a hyperlink More when clicked on runs some javascript function and also changes to a hyperlink Less. Heres what I have which doesnt work. It runs the ajaxpage function fine but not moreToLess. I think its my use of " and ' in the javascript. <script type="text/javascript"> function moreToLess(){ document.getElementById('...

Wtf IE7 - AJAX calls using setTimeout

Hi I have tested this on Firefox, Opera and Seamonkey. It works fine. When it comes to Internet Explorer 7. It works but upto a certain point. I am making an AJAX call to a PHP script every few seconds. In IE7 it makes the first AJAX call and it retrieves the data but it doesn't do it again ever. Even though i have a setTimeout function...

How to implement A simple AJAX call using asp.net page?

Hi, I'm trying to implement this specific example using asp.net page instead of asp page. If you look at the example you can see that there are 2 parts for the page: Mail asp page. This page have JS code that calls other asp file for AJAX use. the other asp page which holds the JS code. The responseText of the call is the client sid...

using reCAPTCHA with ajax....javascript loading problem

Hi, I trying to implement reCAPTCHA in one of my forms,...but i am using ajax as the submission. (More specifically the prototype ajax.updater) Once I submit and error check my form I try to load the reCAPCHTA widget thingy (in my updated div element) which basically just calls a javascript file like so: <script type="text/javascript"...

How can I add properties to an object in IE6?

I've got a particularly tricky problem using AJAX, which works fine in IE7 and Firefox, but not in IE6. I have a very simple home-grown AJAX framework, which requires that I extend the XMLHttpRequest object (or in the case of IE, the XMLHttpRequest ActiveXObject) by adding a couple of properties. Relevant section of code is as follows: ...

parseInt alternative

Firstly - my description ;) I've got a XmlHttpRequests JSON response from the server. MySQL driver outputs all data as string and PHP returns it as it is, so any integer is returned as string, therefore: Is there any fast alternative (hack) for parseInt() function in JS which can parse pure numeric string, e.g. var foo = {"bar": "12...

How do I specify multiple interfaces when registering a class in the Ajax Client script?

I am using the Microsoft Ajax Client library to write some OO javascript. It is possible to mark a class with an interface as follows: Widgets.IndividualLinker.registerClass('Widgets.IndividualLinker', null, Widgets.ILinker); Does anyone know how to register multiple interfaces on a class? Thanks. ...