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

submit the form to the server without opening another page

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();
Please advise. Thanks!!
Jul 19 '05 #1
8 3027
myform.submit() is just the scripting way to submit the form instead of
waiting for the user to click submit. It'll still do the same thing. You
can always response.redirect back to page1.asp after page2.asp does it's
thing.

Ray at home

"Matt" <ma*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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();
Please advise. Thanks!!

Jul 19 '05 #2
so basically myform.submit(); will just submit the form to the server, and
doesn't load any page. What I want is to submit the form data and don't open
another page. That's why <form action="page2.asp" method="post"> may not
work for me.

please advise. thanks!!

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:##**************@tk2msftngp13.phx.gbl...
myform.submit() is just the scripting way to submit the form instead of
waiting for the user to click submit. It'll still do the same thing. You
can always response.redirect back to page1.asp after page2.asp does it's
thing.

Ray at home

"Matt" <ma*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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();
Please advise. Thanks!!


Jul 19 '05 #3
Why don't you want to submit the form?
Surely your user wants to knw whether their form has been submitted or not.
What are you trying to do, perhaps someone has done something similar
before.

Regards
Stu
Jul 19 '05 #4
What do you mean but "don't want to open another page" ?

Data are always posted to a page. Usually they are posted to the page that
is currently displayed and the page redisplays itself (but had the time to
update the info in the database or to process these inputs server side).

If the page doesn't sent any HTML output (iincludes clearing headers), I
believe the display will not change (but generally it's probably better to
have visually a change even such a glimpse so that the user knows it's input
is processsed).

Patrice
"Matt" <ma*******@hotmail.com> a écrit dans le message de
news:eH**************@tk2msftngp13.phx.gbl...
so basically myform.submit(); will just submit the form to the server, and
doesn't load any page. What I want is to submit the form data and don't open another page. That's why <form action="page2.asp" method="post"> may not
work for me.

please advise. thanks!!

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:##**************@tk2msftngp13.phx.gbl...
myform.submit() is just the scripting way to submit the form instead of
waiting for the user to click submit. It'll still do the same thing. You can always response.redirect back to page1.asp after page2.asp does it's
thing.

Ray at home

"Matt" <ma*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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();
Please advise. Thanks!!



Jul 19 '05 #5
Matt wrote:
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();


No. myform.submit() does the same thing that clicking te submit button does.

You will need to use XMLHTTP to do this. A google search should provide the
details.

Since using XMLHTTP involves client-side code. it is off-topic for this
group. If you need further help with it, try one of the .scripting groups.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #6

"Matt" <ma*******@hotmail.com> wrote in message
news:eH**************@tk2msftngp13.phx.gbl...
so basically myform.submit(); will just submit the form to the server, and
doesn't load any page.
No, myform.submit() will do the same thing that would happen if you (the
user) clicked the submit button.
What I want is to submit the form data and don't open
another page. That's why <form action="page2.asp" method="post"> may not
work for me.


What do you want to see when you submit?

Ray at work
Jul 19 '05 #7
Once I click submit button, I want to go to page2.asp in a new window.

That means I should do:
<form action="page2.asp" method="post" target="_blank">

Correct?

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:OM**************@TK2MSFTNGP12.phx.gbl...

"Matt" <ma*******@hotmail.com> wrote in message
news:eH**************@tk2msftngp13.phx.gbl...
so basically myform.submit(); will just submit the form to the server, and doesn't load any page.


No, myform.submit() will do the same thing that would happen if you (the
user) clicked the submit button.
What I want is to submit the form data and don't open
another page. That's why <form action="page2.asp" method="post"> may not
work for me.


What do you want to see when you submit?

Ray at work

Jul 19 '05 #8
That should work. :]

Ray at home

"Matt" <ma*******@hotmail.com> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
Once I click submit button, I want to go to page2.asp in a new window.

That means I should do:
<form action="page2.asp" method="post" target="_blank">

Correct?

Jul 19 '05 #9

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

Similar topics

3
by: Mark Michel | last post by:
Hi. I have made an html form which I would like to send by e-mail. When the recipient receives the e-mail form, I would like them to be able to fill it out and click the Submit button which will...
3
by: Matt | last post by:
When people say submit the form data, does it mean the form data are submitted to web browser using either HTTP GET or POST method, and then it will redirect to another page. For example, this...
2
by: Terence Parker | last post by:
How does one go about submitting a form with a link - but submitting it to a new window AND to a page different to that described within the action="" option of the <form> tag? Say, for example,...
0
by: David Virgil Hobbs | last post by:
What programming codes will enable me to achieve interaction between vb or c# and HTML form values, without a page reload occurring every time a script is run? At least with javascript and vb...
4
by: Bob Lehmann | last post by:
Hi, I pretty sure I've seen this problem addressed before, but I can't find any references. The short story is that I have I have multiple submit buttons on a page, each providing different...
6
by: CJM | last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter> key is pressed? As I understood it, if you have a form with a single submit button, if enter is pressed, the form...
3
by: frenchy | last post by:
I am getting this error in Adobe after struggling with a 'submit' button on an acrobat form that is in production and all the other appdev people in the office are NOT having a problem with. It...
17
by: Johnny BeGood | last post by:
Hi All, Is there a way to post the contents of a form without having to click on the Submit button, i.e <form method="post" action="http://www.whereever.com/ProcessTheData.php"> <INPUT...
1
by: rwelchman | last post by:
Hi, I have a problem with a submit form in that it does not submit(error message), I think because there is another form on the page whose action is to work out various inputted variables and give...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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...
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
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...
0
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...

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.