473,394 Members | 1,870 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Ajax Execution without an event

Quick question and I am sure I just can't find the answer here. Is there a way to make an Asynch request from a browser without having to use an event? The only way I have found in ASP.NET is to create an event (i.e. onclick) then from within my javascript have it exe document.getElementById('myControl').onclick(). This works, but I find it a bit limiting, especially if I want to make a set of stacked calls to the server, based on settings on the form and what is being returned. Also, firing multiple events tends to throw exceptions that kill the client.

Thanks,
Leo
Apr 30 '07 #1
3 1296
acoder
16,027 Expert Mod 8TB
But when would you want to do it? You could perhaps make the request after a certain time using setTimeout or setInterval.
May 1 '07 #2
The came when I needed to verify that the user was valid. This becomes an issue when the user has not used the application for a specified time (i.e. 15 min). You may no longer be sure that the user is the one who started the session, so you have to validate the user first. This leaves you with the possibility that the user needs to log back in before you continue the callback. Since I am running the login routine through AJAX callbacks and not destroying the current form values the user has entered, I would like to break into the normal flow validate, and then when the user has validated, then pickup where I finished. This has caused OutOfIndex exceptions to be thrown on the Callback stack. Very frustrating. I have made some hacks to make it work (sort of, the user needs to redo their last action), but I would like a cleaner user experience. So this is one way I could make use of the able to break into an event a send the routine to verify the login and then pick back up without throwing exceptions. I realize there are probable threading issues that may need to be looked at if I can find a way to run various callbacks during the launch of a single event.

Thanks,
Leo
May 1 '07 #3
acoder
16,027 Expert Mod 8TB
I am not sure if I have understood correctly.

I've never done this, but perhaps you could pass the form details to the function dealing with the login and set them again if need be.

Maybe have two Ajax requests?

I think if you could post some code, it might help. Also what kind of events would you be talking about?
May 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

31
by: Tony | last post by:
I just noticed that prototype.js is one of the files in the Ajax.NET distribution - I'm pretty concerned about this. Does anyone know if this is the same "prototype.js" that is not well-liked...
4
by: tcole6 | last post by:
My problem appears to be Firefox specific. I have a hyperlink that loads a new window. This window contains hyperlinks that call javascript functions in the parent window and then closes the...
4
by: Grant Merwitz | last post by:
Hi I am trying to implement the Microsoft Ajax.NET extensions to perform a lookup on a key press of a text box. What this will do is once a user enters a letter into the textbox, this will...
2
by: =?Utf-8?B?VG9u?= | last post by:
Hello, I want to understand teh benefits of ajax technology. Does anyone has a good website where AJAX EXTENSIONS is worked out so I really understand it. There a 2 main questions: 1) How about...
3
by: JacekDr | last post by:
Hello, I've got the following problem: I want to add and remove dynamically controls to UpdatePanel. In my user control I have a button, but when I click it I get AsyncPostback and Event for...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
7
by: Andrew Poulos | last post by:
If I have code that looks like this ajax = function(str) { var val = ""; // do some stuff here return val; }; var foo = ajax("string");
29
by: zalek | last post by:
I am writing application with Ajax in sync mode - xmlHttp.open("GET", url, false). I noticed that in FireFox handler doesn't starts. It starts when I use xmlHttp.open("GET", url,true). I need to...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.