ajax

JQuery and Ajax

Hi, I am working on adding asynchronous form submission inside a jquery dialog. I am using .ajax(). Everything is working correctly, but the submission takes longer than I would like. I am new to jquery and am unsure how to debug/optimize this. How do I determine if the lag is in the front or backend? Thanks, Natasha ...

Does this session/token authentication system make sense for my web api?

Today I implemented a session/token authentication system for my web api (http get/post rpc style), following this plan: legend: action (param1, param2) : returnvalue1, returnvalue2 login (username, password) : sessionkey, token requestA (sessionkey, token, paramA) : token requestB (sessionkey, token, paramB) : token logout (sessionke...

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...

Ajax append load

it must be jquery I have file text.html with 6 div in (a,b,c,d,e,f) In another file i have a div, i like it to populate the content of a+b+c+d+e+f into that single div I have try .load = but b remplace a i have try append, but i need a temp var so now i am stuck That code get the content from the file textes.html ... div #a and put...

Posting a form without changing pages in a jsp

In a jsp, how do you post a form without changing the page? In essence, I'm trying to: 1) First, kick off a servlet on the backend with a post to process the HttpServletRequest. 2) Second, once the servlet completes, a response message will be posted in a DIV on the page using prototype's Ajax.Updater function. All without leaving...

Ajax: Building HTML vs injecting HTML

Trying to comply with StackOverflow's suggestion of asking a question, not creating a discussion, let us consider these two methods that use the HTTPAsyncRquest to update a web page without refreshing it: 1) Data returned by AsyncRequest is parsed/interpreted in order to build the resulting HTML that updates the page e.g. JSON::parseAn...

IE8 hangs when more than 4 async XmlHttpRequests are triggered concurrently

for (var i = 0; i < 5; ++i) { var xhr; if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else if (window.ActiveXObject) { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } xhr.open('GET', '/Test/LongOperation?p=' + new Date()); xhr.send(''); } This is only a demo (not live code) but it illustrates the core probl...

Asp:GridView.DataBind() using AJAX WebService Javascript

Hai, I am using Visual Studio 2008 and Framework 3.5. I wrote a WebService and I added that WebService in my page through ScriptManager Service Path. I wrote a method in the webservice, that returns List<...>. I captured that value from JavaScript function. Now I want to bind that List<...> value to with my Asp:GridView using JavaScript...

AJAX TextBoxWatermarkExtender causes widening of textbox it is attached to.

Hello. Here's is the issue testcase. I have some textboxes (multiline, wrap=true) with watermark extenders attached. then I type a short world, then space, then long word (like 'short longgggggggggggggggggggggggggggggggggggggggg' that consumes more than line so that scrollbar appears) whenever I set focus to to another textbox, then s...

Problems using window.opener

I have a simple ajax application From this, a popup is launched, with a form. Both the form resultpage, and the ajax application hava a javascript file in common. From the popup window, in the form resultpage, I am trying to call a method from the common javascript file, to apply to the parent window. My javascript file contains an ...

Dojo Tooltip. dojo.data fetch(). Problems in opera

Weird problem with dojo.data. var store = new dojo.data.ItemFileReadStore({ url: "[myUrl]" }); console.log(temp.fetch({ query:{id:'*'}, onComplete: functionOnComplete, onError: functionOnError })); functionOnError show such trace in opera only: message : Statement on line 16: Syntax error Backtrace: Line 16 of linked scri...

JQuery Autocomplete in Dialog Errors

All, I am using the JQuery Autocomplete Plugin 1.0.2 in a JQuery UI Dialog. Unfortunately, there are 2 scenarios that cause script errors in IE and FireFox. I will be providing FireFox Firebug errors as they are more descriptive. First off, here is the JQuery Autocomplete script which allows for the selection of multiple names: va...

Incorets script proxy generating for Web Services Asynchronous WebMethods

I have created an asynchronous web method in one of my web services, which I am trying to call from Javascript. The problem is that the proxy script generated for the client includes two methods instead of one. For each asynchronous web method I define a BeginXXX and EndXXX, where XXX is the method name. When calling the web service from...

User Control with multiple events has asynchronous postback on event not specified in an UpdatePanel

I have a user control which has two events. A button Click and a drop down list SelectedIndexChanged. Also on the same page there is an UpdatePanel, which has an AsyncPostBackTrigger that is conditional on only one of these events; however, an asynchronous postback occurs when either of the events in the user control occur. Is there a...

how to load an english-site image, if the spanish-site-image does not exist

I have a multiple language site. With html, javascript, may be ajax if an image does not exist in spanish folder, it should load image from the english folder. path example english site : images/home.jpg spanish site : es/images/home.jpg Today i have message.properties ... stuff for doing text conversion message.properties message_es....

In javascript, how can I uniquely identify one browser window from another which are under the same cookiedbased sessionId

The users of my web application may have more than one browser window open and pointed to the same page. I would like the state of certain in things in the page (loaded via ajax) to be retained across postbacks. I can either store in a cookie or on my server. Either way, I can't think of how I can distinguish each window. For example...

Ajax query not firing, because it's generating the wrong URL

The following code populates a second dropdown when the first dropdown changes (i.e. cascading dropdowns). However, the Ajax call isn't firing, and I can't figure out why. I'm not getting any syntax or runtime errors. When in debug mode, the GetPlans action is never being called. The inner alert is never called, but the outer one is. To ...

How to get a handle to a dynamic imagebutton in an ajax panel postback

I write an imagebutton to a table cell in a new row when a user selects an item in a list: ImageButton imgbtnRemove = new ImageButton(); imgbtnRemove.ID = "uxStandardLetterDeleteImage_" + items.letterName; imgbtnRemove.CommandName = "uxStandardLetterDeleteImage_" + items.letterName; imgbtnRemove.ImageUrl = items.remove; imgStatus.Altern...

Is it possible for 2 JQuery-ajax working at the same time for the same page?

I tried to run 2 JQuery-ajax at the same time, but it's seem always done the 1st JQuery-ajax before the 2nd JQuery-ajax. Just wandering, is it possible for 2 JQuery-ajax working at the same time for the same page? For example: I created a page which will allows the user to insert a batch of records into the database, and at the same pa...

How to wait for ajax validation to complete before submitting a form?

Having a problem where the form submits before the validateUsername function has a chance to complete the username check on the server-side. How do I submit the form only after the validateUsername function completes? Hope this is clear... form.submit(function(){ if (validateUsername() & validateEmail() & validatePassword()) { retur...