ajax

Very interesting jQuery load behavior, a bug or solution?

I was recently trying to find a bug in some scripting and I discovered this very interesting behavior when loading a page with jQuery. File #1: Test1.htm <div id="test"></div> <script type="text/javascript"> $(document).ready(function(){ $('#test').load('test2.htm #content',function(){ alert('done loading!'); }) }) </script> Fil...

ModalPopupExtender - programmatic changes made to the settings of the related Panel have no effect

I have a popup extender linked to a panel as illustrated by the markup below: <asp:Button runat="server" ID="buttonViewQuestionPopupController" style="display:none" /> <ajaxToolkit:ModalPopupExtender runat="server" ID="popupViewQuestion" PopupControlID="panelViewQuestion" TargetControlID="buttonViewQuestionPopupCo...

CFInput autosuggest: where is the value?

I used a simple CFInput autosuggest code (copied from Ben Forta's blog http://bit.ly/5fFspb). It works ok but I need one additional feature: After a user has used the autosuggest field to choose something, I would like to populate a second form field with the result ... but it doesn't work like in Javascript (using onChange and the valu...

Java AJAX webapp security

I'm experimenting with creating a simple AJAX Java webapp. I'd like to use the container managed security provided by the Servlet container, but having investigated it have a feeling that it isn't going to work how I'd like it to. Basically I'd like to be able to have a login prompt on the main page, without the user having to navigate...

How to pass content of image file from fileupload control to web method via javascript?

Hello! I have a problem with using binary content of file. I want to pass web method content of file. I retriev it from fileupload control on my page via javascript function getAsBinary(). But error appears in web method, when I try to create example of class Image. So, I have the page (.aspx) with fileupload control and scriptmanager. T...

Ajax request with JQuery on page unload

I'm trying to do this: $(window).unload( function () { $.ajax({ type: "POST", url: "http://localhost:8888/test.php?", data: "test", success: function(msg){ alert( "Data Saved: " + msg ); } }); alert (c); }); However, the success alert is never shown, nor does this request seem to be even hitting the server. What am I doi...

Why doesn't my <script> tag work from php file? (jQuery involved here too)

<!-- According to Meta-SO, editing is a way to politely bump, so I am trying this one more time to see if anyone has any more info. Thanks --> UPDATE: Still haven't solved this issue: Hello again: I have worked away at this issue, and still no luck. I am going to try and clarify what I am doing, and maybe that will bring something to...

Why is my AsyncFileUpload Control showing the content type as label after successful upload?

I have an asyncfileupload control from the Ajax Toolkit on my page. It successfully uploads the file and everything works smoothly. When I pull up the div again to upload another file, it sometimes (no pattern yet) just comes up with a label of the content type of the file I previously uploaded. The browse button and textbox have disapp...

is this a safe/good way to implement login with ajax?

Hi I have created the code below to check if a user is valid to login to a database, I am using SSL to secure the connection, but I dont know if this is still a good way in which I have done it. Could anyone give advice? Thanks. (sorry its abit long) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/...

What's causing duplicate character entry in my web form textboxes in IE?

We have a fairly robust ASP.NET app using quite a bit of AJAX, jQuery & CSS. After opening a new instance of the browser using CTRL+N, when entering data into textboxes, if users want to enter "foobar" it dups every key they hit. So they get "ffoooobbaarr" instead. We're not able to isolate this to a consistent debugging environment th...

How do I know if jQuery has an Ajax request pending?

I'm having some problems with a jQuery control we made. Suppose you have a dropdownlist that allows you to enter the ID of the item you're looking for, and when you press ENTER or lose focus in a textbox it validates via jQuery that the ID you entered is correct, showing an alert if it doesn't. The thing is that when an ordinary user en...

jQuery + Ajax Hash / History and more

Hi there, I am trying to get a handle on using URL hashes in jQuery to control history in Ajax and make links / pages book-markable. I have tried almost every plug-in out there, and I cant seem to get any to work properly, so I dont have any code examples really. But I am open to any suggestions, information, tutorials, etc. The differ...

Build a form dynamically with Ajax, jQuery

I'm building a very small web ERP application with PHP / mySQL / CodeIgniter / jQuery The Bill/Invoice is built with current date client data etc Now, I must add products to that new invoice that is being created, without reloading/submitting the page. Each product will have its qtty., description, unit price, subtotal, etc. I'd li...

return string[] from LINQ IQueryable object?

I'm trying to work with the .NET AJAX autocompletion extension. The extension is expecting the following... public static string[] GetCompletionList(string prefixText, int count, string contextKey) My database queries are in a LINQ var object. I'm getting compile-time errors about not being able to convert type IQueryable to string[]....

using ajax 4.0 render list of data into single template

In my project i have called method WCF service which returns a result but now i am using a method which returns a list of result which i want to append to a single template. my callback function look like this: function callbackEvent(_result){ var result=_result; var title = result.Title; var data = result.Data; var...

Wrapping image around objects in web app

I'm creating a web app in ASP.NET like this one: http://www.zazzle.com/cr/design/pt-mug I know how to do everything except wrapping an image around an object. It would be a simple task to do if I would only have to stack an image on top of the other, if they were flat, but if it is a round object, as this mug is, it's kinda tricky. My ...

.ajax will not POST, but will GET with no problem

Hi, I am trying to submit a form using jQuery's .ajax() function. It seems like it should be pretty simple but for some reason I can't get the type: "POST" to work correctly. Using type: "GET" works no problem, but "POST" doesn't seem to actually post anything to my accepting php script. When I do a print_r($_POST) it returns me an e...

AjaxControlToolkit.dll.refresh

What is the role of AjaxControlToolkit.dll.refresh file ? ...

JavaScriptSerializer Error Message - Duplicate type, how do I resolve?

Hi, I'm trying to serialize some strings and return through an ajax call and I'm seeing an odd error. Any help would be very much appreciated: Compiler Error Message: </b>CS0433: The type 'System.Web.Script.Serialization.JavaScriptSerializer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad36...

Functions too fast? So they get skipped?

Hi all, With a function a div-popover gets called and filled with dynamic data using Ajax, PHP, MySQL and some HTML/CSS. All goes fine. When I want to delete an entry in the list just popped over it functions as it should. When I send an update request for my list it also goes the way I want it. But, when i call delete(); update(); rig...