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

Polling function that halts other execution

I am doing some form validation with a mix of javascript and server
side methods called via AJAX. When the submit button is pressed the
onclick calls the validation function that will return true if
everything checks out ok and false if not. The validation function is
setup like so:

function validateForm()
{
returnValue = true;
ajaxFunctionToCheckDate(); //the way it works, inside the function
is the only place to set
ajaxFunctionToCheckEmail(); // the returnValue to false if it does
not checkout
//the ajaxFunctions return to another javascript function
...
//right here I would like to do some polling to make sure all the
ajax functions have returned.
//I have tried using a settimout recursive function but that of
course does not work.
// because it allows the function to return

return returnValue;
}

anyway to make sure a function has returned before allowing the form to
submit?
Thanks,
Jake

Jan 24 '06 #1
2 1367
Its alot faster than submitting, I am not worried about the enabled
scripting either.

Jan 24 '06 #2
On 24/01/2006 17:33, Lee wrote:

[snip]
If you're going to use AJAX to validate, you lose that convenience
and add an absolute requirement of enabled scripting.


Perhaps the more important concern is that if the server is used in this
way to validate, is proper server-side validation being skipped? If it
is, that's a major security issue.

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Jan 24 '06 #3

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

Similar topics

1
by: Sporge | last post by:
Hi All Is there any way to decrease the polling interval that Oracle uses to determine if there are jobs pending in the job queue. It appears that it takes up to 5 seconds for a job to be...
2
by: Sophia Smith | last post by:
What is the statement in VB.Net 2003 to halt the excution of program? Like sleep function in some programming languages. Thanks, Sophia
1
by: linuxnooby | last post by:
HI I am creating a tkinter app. example tkMessageBox.showinfo("Window Text", "A short message") print "blah" The execution of the application halts when the message box is
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
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: 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
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
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
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...

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.