473,394 Members | 1,737 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.

the j in ajax: run javascript method on async postack

hey all,
is there a way to run my javascript method on every async postback?

thanks,
rodchar
Oct 19 '07 #1
4 1726
Its not a "postback", its a callback, and that is where your javascript
callback function is specified, depending on what AJAX framework you are
running.
For example, a typical JSON structure returned from an "AJAX" call would
actually invoke your javascript function by itself, passing in the JSON data
as an argument.

Regarding the "j" in AJAX, that's actually the ONLY letter in the acronym
that makes any sense:

A - asynchronous: not all Remote Scripting calls are async.
J - javascript: yes - all Remote Scripting involves Javascript.
X - Xml: Just about nobody uses XML anymore with AJAX.

I liked it better when it was just called "Remote Scripting". That was 1998.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"rodchar" wrote:
hey all,
is there a way to run my javascript method on every async postback?

thanks,
rodchar
Oct 19 '07 #2
see the Sys.WebForms.PageRequestManager, it has an endRequest event you
can attach your javascript to.

-- bruce (sqlwork.com)

rodchar wrote:
hey all,
is there a way to run my javascript method on every async postback?

thanks,
rodchar
Oct 19 '07 #3
Howdy,

From top of my head:
<script type="text/javascript">

var requestManager = Sys.WebForms.PageRequestManager.getInstance();

requestManager.add_initializeRequest(IntializeRequ estHandler);
requestManager.add_endRequest(EndRequestHandler);

function IntializeRequestHandler(sender, args)
{
// this function will be called
// before async request is executed

// do soemthing here
}

function EndRequestHandler(sender, args)
{
// this function will be called
// after async request is completed

// do soemthing here
}

</script>

Hope it helps
--
Milosz
"rodchar" wrote:
hey all,
is there a way to run my javascript method on every async postback?

thanks,
rodchar
Oct 19 '07 #4
thanks everyone for the help and clarification.
rod.

"rodchar" wrote:
hey all,
is there a way to run my javascript method on every async postback?

thanks,
rodchar
Oct 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Trip | last post by:
Please if someone can help me !!! I need client and server code(principle based on AJAX) for next problem: i have 3 <select> tags on html page.(it must be NO page reload(callback) only...
2
by: Eric | last post by:
I've been reading a lot about the new AJAX functionality included in ASP.NET 2.0. From what I've gathered it gives you the ability to make async server calls using javascript, avoiding the need...
3
by: Erik Cruz | last post by:
Hi. I will start to migrate an asp.net 1.1 application to 2.0. This application uses an Iframe that simply calls a method to update a field on my databse every minute. In order to do this, I...
2
by: Ralph | last post by:
I was playing a little bit with a lot of ajax frameworks. I have even wrote one small by myself. But one thing still drives me crazy: Whenever I'm doing an ajax call I need to specify handler to...
6
by: HockeyFan | last post by:
I'd like to have an AJAX textbox that after the user fills in, will auto-fill another textbox on the page without having a postback occur. It doesn't have to do any filtering or any other thing...
6
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick...
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...
2
by: Mike Gleason jr Couturier | last post by:
Hi guys, I know that the page is reconstructed every time whenever an asynch postback is occuring... I've put a breakpoint in the page render method and the function still gets called when the...
2
by: Johnson | last post by:
While I have done a substantial amount of ASP.NET programming, I have only dabbled with AJAX (update panels and a 3rd party JSON setup - jayrock - that directly updates the DOM). In any case, I'm...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.