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

Loading/splash screen / RegisterOnSubmitStatement

Hi,
Due to long periods during postbacks I'm experimenting on having a load
screen. Best practice for this I have been unable to find so I hope
someone here can point me in the right direction. I use the ASP 2.0
framework.

I want it to be a generel thing and hence I've played around with
ClientScript.RegisterOnSubmitStatement(...)
that injects js into the asp.framwork function

function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() ==
false) return false;
return true}

An example of using this:
function WebForm_OnSubmit() {
page.loadingMessage.show();
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() ==
false) return false;
return true;
}

This will cause clientside validation to be fired AFTER I show my
loading screen and hence the system "locks" if a clientside validator
is triggered

The next - to me - logical step would be to inject the following code
via RegisterOnSubmitStatement
if (typeof(ValidatorOnSubmit) == ""function"" && ValidatorOnSubmit() !=
false) { page.loadingMessage.show(); }

which produces

function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() !=
false) { page.loadingMessage.show(); };if (typeof(ValidatorOnSubmit) ==
"function" && ValidatorOnSubmit() == false) return false;
return true;
}

Homefree? Not yet as this will cause the clientside validator to fail
and just go straight to postback instead.

Any pointers are greatly appreciated.

Brian

Aug 22 '06 #1
1 3642
<bumpanyone?

Brian Christensen wrote:
Hi,
Due to long periods during postbacks I'm experimenting on having a load
screen. Best practice for this I have been unable to find so I hope
someone here can point me in the right direction. I use the ASP 2.0
framework.

I want it to be a generel thing and hence I've played around with
ClientScript.RegisterOnSubmitStatement(...)
that injects js into the asp.framwork function

function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() ==
false) return false;
return true}

An example of using this:
function WebForm_OnSubmit() {
page.loadingMessage.show();
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() ==
false) return false;
return true;
}

This will cause clientside validation to be fired AFTER I show my
loading screen and hence the system "locks" if a clientside validator
is triggered

The next - to me - logical step would be to inject the following code
via RegisterOnSubmitStatement
if (typeof(ValidatorOnSubmit) == ""function"" && ValidatorOnSubmit() !=
false) { page.loadingMessage.show(); }

which produces

function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() !=
false) { page.loadingMessage.show(); };if (typeof(ValidatorOnSubmit) ==
"function" && ValidatorOnSubmit() == false) return false;
return true;
}

Homefree? Not yet as this will cause the clientside validator to fail
and just go straight to postback instead.

Any pointers are greatly appreciated.

Brian
Aug 29 '06 #2

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

Similar topics

3
by: andrewcw | last post by:
I implemented the simplest of splash screens ( static and on its own thread ). But it seem that when first called maybe 8 seconds elapsed before it showed up, the main form follows several seconds...
14
by: SStory | last post by:
I am trying to make a splash screen for my vb.net app. It is an mdi app. including the splash code produces wierd results. not inluding makes things fine. Also have tried loading the splash...
3
by: Maileen | last post by:
Hi, I have a module in which are define 2 forms as below : '------ Module Module1 Public MyMain As New FMain Public MySplash As New FSplash Public Sub Main() MySplash.Show()
11
by: K E Senthil Kumar | last post by:
Hi, I have created an application which uses a SQL server database. I created a mainform which retreives all the customers. This takes about 3sec. I have created a splash screen too. I use a...
1
by: steve | last post by:
Hi All I want to display a splash screen when my windows application loads, to show sql server connection progress etc. First though I want to run some code to check for a valid program...
2
by: Mika M | last post by:
Hi! My Windows Forms VB 2005 application has Splash Screen form specified in My Project/Application/Splash Screen. How can I close Splash Screen form programmatically when Startup form...
2
by: New | last post by:
I have a form that is slow to load. I would like it to load in backround while a splash screen show. How would I do that?
1
by: BRAHM | last post by:
I am using this code to set up the splash screen startup time. Protected Overrides Function OnInitialize( _ ByVal commandLineArgs As _ System.Collections.ObjectModel.ReadOnlyCollection(Of...
1
by: BRAHM | last post by:
I am using this code to set up the splash screen startup time. Protected Overrides Function OnInitialize( _ ByVal commandLineArgs As _ System.Collections.ObjectModel.ReadOnlyCollection(Of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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...
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...

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.