473,387 Members | 1,573 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,387 software developers and data experts.

How does client know when postback finished?

A postback I'm doing takes ages to get the data which it then uses to
populate a table.

What I want to know is:

How can I get the client side to fire a 'resize' event when the postback
thing has finished?
Nov 18 '05 #1
6 2473
"adolf garlic" <ad*********@discussions.microsoft.com> wrote

How can I get the client side to fire a 'resize' event when the postback
thing has finished?


Hi,

As far as the client is concerned the postback is an entirely new page.
Therefore, the client need to look for the page load being complete, and the
run your 'resize' script. Perhaps something like:-

<body onLoad="javascript:resize();">

HTH,
Martin

--
Martin Eyles
ma**********@NOSPAM.bytronic.com
Nov 18 '05 #2
You could wire handler onto body's onload which is raised when document is
completely loaded at client.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsider
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"adolf garlic" <ad*********@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
A postback I'm doing takes ages to get the data which it then uses to
populate a table.

What I want to know is:

How can I get the client side to fire a 'resize' event when the postback
thing has finished?

Nov 18 '05 #3

I'm already calling the "resize" function from the form load event (which in
turn is called by the body load event.)

It doesn't work.
"Martin Eyles" wrote:
"adolf garlic" <ad*********@discussions.microsoft.com> wrote

How can I get the client side to fire a 'resize' event when the postback
thing has finished?


Hi,

As far as the client is concerned the postback is an entirely new page.
Therefore, the client need to look for the page load being complete, and the
run your 'resize' script. Perhaps something like:-

<body onLoad="javascript:resize();">

HTH,
Martin

--
Martin Eyles
ma**********@NOSPAM.bytronic.com

Nov 18 '05 #4
Surely this will just trigger the same behaviour (as shown in other replies)
as if i were just calling page load?

If not then what do you mean by wiring a handler?
Alternatively, is there a way of calling client script functions from the
server side (this would be the best solution)

"Teemu Keiski" wrote:
You could wire handler onto body's onload which is raised when document is
completely loaded at client.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsider
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"adolf garlic" <ad*********@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
A postback I'm doing takes ages to get the data which it then uses to
populate a table.

What I want to know is:

How can I get the client side to fire a 'resize' event when the postback
thing has finished?


Nov 18 '05 #5
It looks like there is a bit of confusion between server and client side.
You don't "call" a client side script from server side. Server side you
create an HTML page. You can inject in this page some client side script
that will be called client side once this part is loaded client side or on
whatever event is available client side.

IMO Martin made a good suggestion ie. using the onload event on the body
tag. If reporting JS errors is disabled note also the event may work but get
unoticed because of an error in your javascript code. You could start by
just displaying an alert box when the document is loaded to see if it fires
correclty before plugin here more complex scripts. Make sure also your
browser is configured to report js errors...

Under its simplest form, you could just have :
<body onload="alert('Loaded !')"> in your ASPX page.

Patrice

--

"adolf garlic" <ad*********@discussions.microsoft.com> a écrit dans le
message de news:6A**********************************@microsof t.com...
Surely this will just trigger the same behaviour (as shown in other replies) as if i were just calling page load?

If not then what do you mean by wiring a handler?
Alternatively, is there a way of calling client script functions from the
server side (this would be the best solution)

"Teemu Keiski" wrote:
You could wire handler onto body's onload which is raised when document is completely loaded at client.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsider
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"adolf garlic" <ad*********@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
A postback I'm doing takes ages to get the data which it then uses to
populate a table.

What I want to know is:

How can I get the client side to fire a 'resize' event when the postback thing has finished?


Nov 18 '05 #6
a-ha!
i just put a message box in the form load and it is being called...
....obviously a problem with the resize function

thanks!
a.

"Patrice" wrote:
It looks like there is a bit of confusion between server and client side.
You don't "call" a client side script from server side. Server side you
create an HTML page. You can inject in this page some client side script
that will be called client side once this part is loaded client side or on
whatever event is available client side.

IMO Martin made a good suggestion ie. using the onload event on the body
tag. If reporting JS errors is disabled note also the event may work but get
unoticed because of an error in your javascript code. You could start by
just displaying an alert box when the document is loaded to see if it fires
correclty before plugin here more complex scripts. Make sure also your
browser is configured to report js errors...

Under its simplest form, you could just have :
<body onload="alert('Loaded !')"> in your ASPX page.

Patrice

--

"adolf garlic" <ad*********@discussions.microsoft.com> a écrit dans le
message de news:6A**********************************@microsof t.com...
Surely this will just trigger the same behaviour (as shown in other

replies)
as if i were just calling page load?

If not then what do you mean by wiring a handler?
Alternatively, is there a way of calling client script functions from the
server side (this would be the best solution)

"Teemu Keiski" wrote:
You could wire handler onto body's onload which is raised when document is completely loaded at client.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsider
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"adolf garlic" <ad*********@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
>A postback I'm doing takes ages to get the data which it then uses to
> populate a table.
>
> What I want to know is:
>
> How can I get the client side to fire a 'resize' event when the postback > thing has finished?


Nov 18 '05 #7

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

Similar topics

1
by: Sue | last post by:
For performance purposes, I am using client-side scripts to show-hide (via css display: hide, display: block) several rows of a table depending on which imagebutton is clicked. Because of workplace...
1
by: Christopher D. Wiederspan | last post by:
I'm wondering if there's a way to use javascript to disable a ASP.NET web page before it starts to postback. Specifically, here's what I'm running into. I've got a webform that has an autopostback...
6
by: Brian Miller | last post by:
I've been constructing an ASP.Net application using the 1.1 framework, and have been using Web Matrix for development purposes. Now that my application is near completion, I wanted to see if I can...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
10
by: Mr Newbie | last post by:
DropDown lists and Listboxes do not appear in the list of controls and values passed back to the server on PostBack in Request.Form object. Can someone confirm this to be correct and possibly...
4
by: Matt Jensen | last post by:
Howdy all Hopefully I can explain my problem straightforwardly. In it's simplest explanation, what I want to do is have a hyperlink that, when clicked, executes some client side JavaScript and...
2
by: Mark Rae | last post by:
Hi, Looking for some advice again... Imagine two ListBox controls denoting something like students and team membership e.g. many students can be members of many teams (e.g. the hockey team,...
5
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one error I just cannot find a solution to: On...
8
by: MAX2006 | last post by:
Hi, I am doing some client side javascipt work. I have a handler for window.onUnload event and within the code; I need to know the name of the asp.net button caused the postback. How can I do...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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: 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
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,...

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.