ajax

ASP.NET AJAX suppress onbeforeunload for AJAX requests from updatepanel

I am hooking the window.onbeforeunload event in an aspx page. I need that not to fire if I page a GridView that's in an UpdatePanel on the same page. I have tried hooking the PageRequestManager's initializeRequest event but this fires too late, i.e. after onbeforeunload. I have also tried checking PageRequestManager.get_isInAsyncPostBa...

AJAX readystate breaking, AJAX not processing data fast enough?

http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#xmlhttprequest 4 Loaded The data transfer has been completed. readyState == 4 I used the ajax framework from w3schools. I want to process the data from a group of rows. (form fields). I loop through the form elements and send them to the ajax script. The ajax script then sends t...

ASP.Net Ajax client side framework failed to load while using MultiHandleSliderExtender

MultiHandleSliderExtender cannot be displayed in IE7 but gets dislayed in IE6. It is created at runtime and gives ASP.Net Ajax client side framework failed to load along with sys is undefined error. ...

AJAX behaving differently for Submit button vs. this.form.submit?

I'm trying to auto-save a selection in a dropdown (ASP.NET, MVC, VB), but it's not behaving as expected. Here's the dummy action in the controller: <AcceptVerbs(HttpVerbs.Post)> _ Function TestAction(ByVal id As Integer) As ActionResult Return Content(id) End Function and the HTML: <script type="text/javascript" src='<%= Url.Cont...

PHP Sessions stored in MySQL in Ajax heavy environment

I'm looking to change my application to store PHP Session data in MySQL. The application is ajax intensive but does not utilize long-polling or any other type of persistent connection. My question is, are there any gotcha's I need to be aware of when writing this code? For example; I have a page that sends 4 ajax requests to load da...

how do you go about dealing with ajax and Model Binding when complex types are involved?

I would like to keep model binding when doing ajax calls from my view. I'm using jquery ajax to make the calls, and just as an example- this is my controller method I want to call from ajax: public ActionResult Create(Person personToCreate) { //Create person here } As you can see, this method is relying on Model Binding. This make...

Convert special chars (Danish: æøå) on jQuery AJAX call

Hello. I use jQuery to do AJAX calls. But specialchars like ÆØÅ (danish letter) comes out as garble. Is there an easy way to fix it? ...

Script control client object loss of scope

I've got a script control that has a control embedded within it that exposes a server side property for a client side click event. For example, embeddedControl.OnClientAppointmentClick. So my question is how would I wire this event to my script control client object. I've tried something like embeddedControl.OnClientAppointmentClick =...

inform user during php calculation w/jquery

hi, I'm writing code in PHP that analyzes user input. I'm hoping to analyze it through a AJAX request using jquery. I'd like to provide real-time feedback to the user while I'm preforming the calculations. For example: "Uploading your input", "Analyzing", "Preparing final result" and so forth. How can I go abut doing this? ...

Autocomplete extender in Ajax Toolkit and JQuery limiting to "Starts with"

There are many flavours to the AutoComplete implementation, I first did a WPF implementation that was very robust, each entry took keywords, so when searching for an employee, it didn't matter if you typed the first or last name, the results came back similar to Google Suggest. What I have found limiting in both the JQquery autocomplete...

What is the best way to bind a repeater to an AJAX response?

I am trying to bind a repeater after an AJAX response. Step 1 : Make an Ajax call to the fucntion in the code behind: Step 2 : Do some business logic and finally bind the data to the repeater Step 3 : Get the response back from the codebehind to the Ajax call Step 4 : Once we get the response back what is the right way to strip out extra...

Accessing AJAXed elements via jQuery and changing their parent

Im trying to get ajaxed content to alter their parent. How can I do this with jQuery, I can't seem to get the syntax right. <div id="menu"> <a href="#" id="show_names">Show Names</a> </div> <!-- AJAXED CONTENT --> <div id="content"> <a href="#" id="person">Janice</a> <a href="#" id="person">Steve</a> </div> <!-- AJAXED ...

JQuery - AJAX load() method help

I need to get content from an external page and pass it as an argument to a function. I have looked into the url() method in the JQuery documentation but it seems it's only possible to use it to insert external content into div or some other HTML element. Basically what I need to do is: // I need to insert external page's content into ...

Can Prototype or JQuery return an HTTP status code on an AJAX request

url = "http://example.com" new Ajax.Request(url, { onComplete: function(transport) { alert(transport.status); } }); I'd like that to return a status of 200 if the site is working, or 500 if it is not working, etc.. But that code is returning 0 all the time. Ultimately, I want to have a setinterval function that regularly pings...

Backing bean scopes. How they works?

I have some misunderstanding with JSF backing bean scope. I am newbie in JSF and now write simple project and all my beans mostly have session scope. But if my site will have many users that's mean my session will be very very big and this kill my server. Some people said my that solution is use request scope beans. But, for example, whe...

Redirect after refreshing update panel

Hello, Do you think it's possible to refresh an update panel and immediately after redirecting the response (for instance a download) ? I tried this: an invisible button -> as an asyncpostbacktrigger a download button -> when it is clicked the onclientclick clicks the invisible button the click event on the invisible button re...

Jquery Ajax remove rows from table and in db

Hello Everyone. I have a html table which if filled by values of an mysql table. This way: function getCategories(){ $prod = new C_Product(); $cat= $prod->getCategorieenAsArray(); $tr = ""; foreach ($cat as $key => $value){ $tr.="<tr><td>&nbsp;</td><td>$value</td><td><img src=\"images/delete_button.gif\"></td></tr>\n"; } retu...

Using ASP.NET WebService with javascript

Hi evrery one! I have this code in my project: var UI = { Layouts: { ShowLayoutSettings: function(pid, lid) { My.PageServices.GetPageLayout(lid, pid, UI.Layouts._onShowLayoutSettings); }, _onShowLayoutSettings: function(obj) { alert(obj.ID); } } } and in my asp.net project a web service named PageSer...

jquery ajax - php question

Hello everyone, When i do an ajax request i go to a php script which does something for me. Either it deletes an record from the db or it doesn't. If it goes ok. I want to deleted and update my html table. Else I want to show an error message or so. But in my php I can't do something like return false; return true; I need to ec...

Is there any advantage of AJAX/XHR over pure JSON/P implementations?

Not strictly a programming topic but input is appreciated. I've been developing a lot lately with YouTube APIs and I started with PHP code, using SimpleXML, then actually skipped AJAX and went straight to using native JSON and doing everything client-side. While it "feels" faster, I wonder if it's ready for primetime yet. Even with t...