Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Confirmation box before server side event completes.

Status
Not open for further replies.

e106199

Programmer
Nov 17, 2005
27
US
Hi all,
is the below scenerio possible?
user submits the form that will insert in db but before the data is written in db i want to make a check. The check function will run and find out if the form data exist in db or not. If it exists a confirmation box will appear and ask user "similar data exists in db, click ok to continue or click cancel to stop operation". Clicking ok will complete the operation and data will be inserted in db and clicking cancel will stop the page execution.

So in the middle of the server side code execution a javascript will alert the user and again depending on the confirmation selection server side event will continue or stop.

Please tell me its possible,
thank you
-shane
 
You can't run server side code from client side script. If you want to do a check if data exists, you will have to write it in server side code.

Jim
 
Jim's correct, although you could implement a Client Callback to do it so that the whole page isn't posted back to the server to do the check.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I wasnt talking about running a server side code on the client side. I was talking about calling a client side confirmation on the server side. the check function is a server side function, if it detects a match i want it to pop up a message and depending on the selection of the message db insertion will stop (this may be accessing server code from client) or it will continue.

thank you
-shane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top