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

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 3330
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**************@TK2MSFTNGP10.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**************@tk2msftngp13.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**************@TK2MSFTNGP10.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**************@tk2msftngp13.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**************@TK2MSFTNGP10.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
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...
8
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"...
2
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...
2
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...
3
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...
3
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
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...
5
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...
6
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.