Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 15th, 2006, 11:23 AM
Friend of Wrox
 
Join Date: Apr 2004
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default onUnload Conditional Submit

Greetings,

I was wondering if anyone knew of a way to fire a form submission in the onUnload based upon whether the user clicked the submit button or exited any other way. Basically, what I want is to fire some code if they click submit, but do nothing if they leave any other way. I know that there is a better way to do this, but I am attempting to utilize sharepoint and cannot access the form button itself.

Thoughts?

Clay Hess
__________________
Clay Hess
 
Old March 16th, 2006, 02:48 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Fs22!!
you can use one hidden text box value,which can be set to 1 (default is 0) ,onunload event just check the value ,and fire ur reqd page submission.
HOpe this will help you


Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to submit the different data on single submit pushpa Classic ASP Databases 1 January 24th, 2007 07:10 PM
PHP calling JavaScript onUnload mlewitz PHP How-To 3 January 17th, 2006 10:24 AM
window.onunload is not working sirsyme Classic ASP Basics 1 August 19th, 2005 04:02 AM
Conditional submit arnabghosh Javascript How-To 1 August 4th, 2005 02:40 AM
How can we submit a form without a submit butto phpsharma BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 October 20th, 2003 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.