473,800 Members | 3,052 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Submit Form on Page Load

Is it possible to submit a form as soon as the page it is on loads and then
redirect to another page?

Thanks
Jul 19 '05 #1
4 3343
With client-side code, you can call the .submit method of your form, but do
you mind if I ask what the point of doing this is?

Ray at work

"Keith" <@.> wrote in message news:e3******** ******@TK2MSFTN GP10.phx.gbl...
Is it possible to submit a form as soon as the page it is on loads and then redirect to another page?

Thanks

Jul 19 '05 #2
I have a pagee which performs an insert to a SQL DB, but I also need to
perform another diifferent insert at the same time, so I thought if I submit
my first form, redirect to my second page and then automatically submit my
second form and redirect that would solve the problem.
"Ray at <%=sLocation% > [MVP]" <myfirstname at lane34 dot com> wrote in
message news:et******** ******@tk2msftn gp13.phx.gbl...
With client-side code, you can call the .submit method of your form, but do you mind if I ask what the point of doing this is?

Ray at work

"Keith" <@.> wrote in message

news:e3******** ******@TK2MSFTN GP10.phx.gbl...
Is it possible to submit a form as soon as the page it is on loads and

then
redirect to another page?

Thanks


Jul 19 '05 #3
Wow!

Run Ray

-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #4
That can all be done without having to submit a form when the page
loads. You have two options...

1) Execute both inserts from the same page by combining the code from
both - and making any neccessary accomodations since the form no longer
exists.

2) Execute the first page and then redirect to the second. Using this
option you should be able to handle any unexpected problems.

David
www.gatewayorlando.com

Keith wrote:
I have a pagee which performs an insert to a SQL DB, but I also need to
perform another diifferent insert at the same time, so I thought if I submit
my first form, redirect to my second page and then automatically submit my
second form and redirect that would solve the problem.
"Ray at <%=sLocation% > [MVP]" <myfirstname at lane34 dot com> wrote in
message news:et******** ******@tk2msftn gp13.phx.gbl...
With client-side code, you can call the .submit method of your form, but


do
you mind if I ask what the point of doing this is?

Ray at work

"Keith" <@.> wrote in message


news:e3******** ******@TK2MSFTN GP10.phx.gbl...
Is it possible to submit a form as soon as the page it is on loads and


then
redirect to another page?

Thanks




Jul 19 '05 #5

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

Similar topics

6
9647
by: HH | last post by:
I'm learning to design web applications with php, mysql, and apache from a book. I copied a sample application called guestbook 2000 that came with the CD in the book to my htdocs folder, but couldn't get the sign guestbook page (sign.php) to work. This page first checks the value of the $submit variable. If it is not "Sign", the page displays a blank form for the guest to sign. If it is "Sign", the page process the form information and...
8
3054
by: Matt | last post by:
I want to submit the form to the server without opening another page. When we do the following, it will submit the form data in myform to the IIS, and open page2.asp. <form name="myform" action="page2.asp" method="post"> But I don't want to open another page, I just want to submit the form data. Should I do the following?? myform.submit();
2
18361
by: Halldór Ísak Gylfason | last post by:
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame. I want to detect when the frame has been loaded with the result of the form submit. Of course I have tried some event handlers like onload, onactivate, onreadystatechange, but they do not work in this example. They only seem to work, when the "SRC"...
2
3827
by: anonieko | last post by:
Scenario: You have a page that is TOO slow to refresh. But it allows partial flushing of html contents. I.e. Submit button already appears but you don't want your users to click on it prematurely because other parts are still coming. Here I put a javascript the will enable only submit button only after 5 seconds after the page is load fully.
3
2260
by: Chung | last post by:
Hi all, I have used the following code for doing the form submission. I don't think this is a right way to submit a from to a new aspx page because I need to add a dummy form in between. Could anyone tell me a proper way to do this? Looking forward to your reply. Thanks!
3
2432
by: Dabbler | last post by:
How do I tell wether I'm seeing autopostback vs submit button click in Page_load? Thanks for any clues.
16
19061
by: NathyZif | last post by:
I know I know, why would I want to submit the form from server-side code, if the only way to get to the server-side code was BY submitting the form. But that's just it, when the code-behind page_load event fires it doesn't really "submit" the form as I would like it submitted. Here's my problem, I made a shopping cart for a website, and to get the information securely paid for I need to send a form to paypal using method="post" and...
5
1942
by: Alex | last post by:
Hello, I hope I can explain this properly. I'm writing an application with a tabbed-based navigation, and a form which gets filled out by users will be split into 5 subtabs. What I need is instead of the user needing to hit a SUBMIT button each time the form within a tab is complete (Before clicking the next tab), I want clicking any tab to submit the data. I'm affraid that by not doing this, people will fill out the data in tab 1,...
6
1848
by: Ellie | last post by:
How can I force a submit on a form. I want to load a form but then I want to close it and have it do something and then redirect it. This is ASP 3.0. thanks
0
9694
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9553
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10509
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10256
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10039
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7584
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4152
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2953
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.