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

call javascript function after validation

When the user clicks a button on my page, a server side operation starts
which takes several seconds to complete.
To make the user less impatient I want to show a animating gif when he/she
clicks the button. I've been able to do this by calling a function by using
the onclick event of the button. My problem is that the function is always
called. I only want it to be called if page validation returns true. Is this
possible?

--
Eirik Eldorsen
Nov 18 '05 #1
4 1636
"Eirik Eldorsen" <NO************@eldorsens.nettsider.no> wrote in
news:ek**************@TK2MSFTNGP12.phx.gbl:
I only want it to be called if page validation returns true. Is this
possible?


You'll need to redirect to a processing page, then continue processing
while displaying the animated gif.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2
I was considering that solution, but I don't know how to autmatically start
the processing code. I can't put it in the Page_Load method. Can I put the
processing code in a thread, that I start in Page_Load?
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
You'll need to redirect to a processing page, then continue processing
while displaying the animated gif.

Nov 18 '05 #3
"Eirik Eldorsen" <NO************@eldorsens.nettsider.no> wrote in
news:#W**************@TK2MSFTNGP11.phx.gbl:
I was considering that solution, but I don't know how to autmatically
start the processing code. I can't put it in the Page_Load method. Can
I put the processing code in a thread, that I start in Page_Load?

Check this article:

http://www.informit.com/articles/art...;-158095;2004-
07-19

You can also use the same page as the form entry page, but just turn off
all the controls and display the "please wait page". That way you don't
need to redirect.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #4
Thank you! I'll check it out

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
Check this article:

http://www.informit.com/articles/art...;-158095;2004-
07-19

Nov 18 '05 #5

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

Similar topics

6
by: Charles Banas | last post by:
weird subject - i hope more than just one curious regular will hear me out. :) ok, i've got a bit of a big problem, and i need answers as soon as possible. i know this forum is meant for web...
5
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one...
1
by: Filiz Duman | last post by:
Is it possible to call a javascript function based in the parent window from the child window ? I do open a pop up window from the parent window with: newwindow = window.open (...) and assign...
2
by: GIMME | last post by:
Background ... I've created a web application that allows a user to create an HTML application from IE. The application itself creates an XML representation of a XHTML form. The XHTML...
7
by: mhk | last post by:
Hi, Is there any way to create/set Session veriable in JavaScript. Please let me know if anyone has an idea. Thanks alot.
8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
5
by: Peter Afonin | last post by:
Hello, I'm not an expert in Javascript, so I'm seeking an advice. As I mentioned in my previous post, I use Javascript to check whether at least one checkbox in the datagrid has been checked....
7
by: shahidrasul | last post by:
i have two problem 1. how to call a javascript function from form page and also how to call c# function from javascript because when user click on button i want to validate field of form and if...
2
by: goscottie | last post by:
I need to find a way to either 1. run and check all Validation controls (in my case one CompareValidator) and run client side javascript function. In this case I'll use <asp:Button>. So if all...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.