473,763 Members | 4,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple question I hope!

Hi
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.

The form CGI I'm using, Demon's does not allow this and the default page and
message is , well, crap!

Can this be done?

Thanks

Adrian
Jul 20 '05 #1
10 1920
Yes, it can be:

Part I

<!--- test.html --->
<html>
<head>
<title>Test</title>
</head>
<body>
<form name="adrianFrm " action ="/cgi-bin/myscript.cgi" method = "post">
<input type = "submit" value = "Send">
</form>
</body>
</html>

Part II

<!--- mysqcript.cgi --->
<!--- make sure your script outputs the following --->
<html>
<head>
<title>Test</title>
<meta name = "http-equiv" content = "0;url=http ://www.mysite.com/">
</head>
<body>
<p>Click here to <a href = "http://www.mysite.com/">continue</a></p>
</body>
</html>

Adrian wrote:
Hi
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.

The form CGI I'm using, Demon's does not allow this and the default page and
message is , well, crap!

Can this be done?

Thanks

Adrian


Jul 20 '05 #2
Hi
Thanks, but I my isp provide a preset script that I can't modify only
call, so I'm trying to do it from JS within the page!

Adrian

"orlando echevarria" <or*****@engr.u conn.edu> wrote in message
news:3F******** ******@engr.uco nn.edu...
Yes, it can be:

Part I

<!--- test.html --->
<html>
<head>
<title>Test</title>
</head>
<body>
<form name="adrianFrm " action ="/cgi-bin/myscript.cgi" method = "post">
<input type = "submit" value = "Send">
</form>
</body>
</html>

Part II

<!--- mysqcript.cgi --->
<!--- make sure your script outputs the following --->
<html>
<head>
<title>Test</title>
<meta name = "http-equiv" content = "0;url=http ://www.mysite.com/">
</head>
<body>
<p>Click here to <a href = "http://www.mysite.com/">continue</a></p>
</body>
</html>

Adrian wrote:
Hi
I want to write a form that when a user presses submit it carries out the submit action and then closes the browser or redirects to another page.

The form CGI I'm using, Demon's does not allow this and the default page and message is , well, crap!

Can this be done?

Thanks

Adrian

Jul 20 '05 #3
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.


If I understand you correctly, then you want the form processing to be done
on the page locally, rather than on the server?

If so... well... It is possible to write a javascript function to 'validate'
the form and perform pretty much any 'local' operations of the info...
However, usually for a form to be of any use it needs to send its data to
the server.

If all you want to do is rewrite the form in a fancy way so that it looks
nice, you can do that and still submit the form data to the cgi script.
However, getting it to redirect to another page after submission is another
matter... I'm pretty sure that you cannot change that behaviour, as upon
processing the cgi script, its output is sent to the browser directly. So
unless you can modify the cgi script, you're stuck. Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere.
Which is doubtful.

HTH.

P.
Jul 20 '05 #4
Hi
Thanks, the redirect in your second scenario is what I'm trying to
achieve or if not a redirect, to submit the from and then close the window
before it receives a reply.

Thanks

Adrian
"The Plankmeister" <pl************ ******@hotmail. com> wrote in message
news:3f******** *************** @dread16.news.t ele.dk...
I want to write a form that when a user presses submit it carries out the submit action and then closes the browser or redirects to another page.
If I understand you correctly, then you want the form processing to be

done on the page locally, rather than on the server?

If so... well... It is possible to write a javascript function to 'validate' the form and perform pretty much any 'local' operations of the info...
However, usually for a form to be of any use it needs to send its data to
the server.

If all you want to do is rewrite the form in a fancy way so that it looks
nice, you can do that and still submit the form data to the cgi script.
However, getting it to redirect to another page after submission is another matter... I'm pretty sure that you cannot change that behaviour, as upon
processing the cgi script, its output is sent to the browser directly. So
unless you can modify the cgi script, you're stuck. Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere.
Which is doubtful.

HTH.

P.

Jul 20 '05 #5
If you are using the formail.pl script, the hidden field is "redirect".

Eric Klein
er********@mssm .edu
http://www.mssm.edu/students/kleine04
"The Plankmeister" <pl************ ******@hotmail. com> wrote in message news:<3f******* *************** *@dread16.news. tele.dk>...
Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere.
Which is doubtful.

HTH.

P.

Jul 20 '05 #6
If you are using formail.pl, the hidden field is called "redirect".

Eric Klein
<a href="mailto:er ********@mssm.e du>er********@m ssm.edu</a>
<a href="http://www.mssm.edu/students/kleine04">http://www.mssm.edu/students/kleine04</a>
"The Plankmeister" <pl************ ******@hotmail. com> wrote in message news:<3f******* *************** *@dread16.news. tele.dk>...
I want to write a form that when a user presses submit it carries out the
submit action and then closes the browser or redirects to another page.


If I understand you correctly, then you want the form processing to be done
on the page locally, rather than on the server?

If so... well... It is possible to write a javascript function to 'validate'
the form and perform pretty much any 'local' operations of the info...
However, usually for a form to be of any use it needs to send its data to
the server.

If all you want to do is rewrite the form in a fancy way so that it looks
nice, you can do that and still submit the form data to the cgi script.
However, getting it to redirect to another page after submission is another
matter... I'm pretty sure that you cannot change that behaviour, as upon
processing the cgi script, its output is sent to the browser directly. So
unless you can modify the cgi script, you're stuck. Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere.
Which is doubtful.

HTH.

P.

Jul 20 '05 #7
Hi,
Thanks but I guess its not formail.pl as redirect didn't work!

The form tag is :
<form action="/cgi-bin/mailform" method="get">

And the ISP is www.demon.net

if that helps

Thanks

Adrian

"Eric Klein" <er********@mss m.edu> wrote in message
news:16******** *************** ***@posting.goo gle.com...
If you are using formail.pl, the hidden field is called "redirect".

Eric Klein
<a href="mailto:er ********@mssm.e du>er********@m ssm.edu</a>
<a href="http://www.mssm.edu/students/kleine04">http://www.mssm.edu/students/kl
eine04</a>

"The Plankmeister" <pl************ ******@hotmail. com> wrote in message

news:<3f******* *************** *@dread16.news. tele.dk>...
I want to write a form that when a user presses submit it carries out the submit action and then closes the browser or redirects to another
page.
If I understand you correctly, then you want the form processing to be done on the page locally, rather than on the server?

If so... well... It is possible to write a javascript function to 'validate' the form and perform pretty much any 'local' operations of the info...
However, usually for a form to be of any use it needs to send its data to the server.

If all you want to do is rewrite the form in a fancy way so that it looks nice, you can do that and still submit the form data to the cgi script.
However, getting it to redirect to another page after submission is another matter... I'm pretty sure that you cannot change that behaviour, as upon
processing the cgi script, its output is sent to the browser directly. So unless you can modify the cgi script, you're stuck. Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere. Which is doubtful.

HTH.

P.

Jul 20 '05 #8
for mailform the hidden field should be _1_SuccessDocum ent
good luck

Eric Klein
er********@mssm .edu
http://www.mssm.edu/students/kleine04
"Adrian" <Ad************ *@NOSPAMhotmail .com> wrote in message news:<bk******* ************@ne ws.demon.co.uk> ...
Hi,
Thanks but I guess its not formail.pl as redirect didn't work!

The form tag is :
<form action="/cgi-bin/mailform" method="get">

And the ISP is www.demon.net

if that helps

Thanks

Adrian

"Eric Klein" <er********@mss m.edu> wrote in message
news:16******** *************** ***@posting.goo gle.com...
If you are using formail.pl, the hidden field is called "redirect".

Eric Klein
<a href="mailto:er ********@mssm.e du>er********@m ssm.edu</a>
<a

href="http://www.mssm.edu/students/kleine04">http://www.mssm.edu/students/kl
eine04</a>


"The Plankmeister" <pl************ ******@hotmail. com> wrote in message

news:<3f******* *************** *@dread16.news. tele.dk>...
> I want to write a form that when a user presses submit it carries out the > submit action and then closes the browser or redirects to another page.
If I understand you correctly, then you want the form processing to be done on the page locally, rather than on the server?

If so... well... It is possible to write a javascript function to 'validate' the form and perform pretty much any 'local' operations of the info...
However, usually for a form to be of any use it needs to send its data to the server.

If all you want to do is rewrite the form in a fancy way so that it looks nice, you can do that and still submit the form data to the cgi script.
However, getting it to redirect to another page after submission is another matter... I'm pretty sure that you cannot change that behaviour, as upon
processing the cgi script, its output is sent to the browser directly. So unless you can modify the cgi script, you're stuck. Unless there is a
parameter you can pass to the cgi script that will redirect it somewhere. Which is doubtful.

HTH.

P.

Jul 20 '05 #9
Hi Eric,
I have tried:
<input type="hidden" name="_1_Succes sDocument"
value="http://uk.altavista.co m/">
<input type="hidden" name="_1_Succes sDocument" value="index.ht m">

Neither had changed the page displayed! did I enter them correctly? If so I
guess demon have tweaked their script!

Thanks

Adrian
"Eric Klein" <er********@mss m.edu> wrote in message
news:16******** *************** ***@posting.goo gle.com...
for mailform the hidden field should be _1_SuccessDocum ent
good luck

Eric Klein
er********@mssm .edu
http://www.mssm.edu/students/kleine04
"Adrian" <Ad************ *@NOSPAMhotmail .com> wrote in message

news:<bk******* ************@ne ws.demon.co.uk> ...
Hi,
Thanks but I guess its not formail.pl as redirect didn't work!

The form tag is :
<form action="/cgi-bin/mailform" method="get">

And the ISP is www.demon.net

if that helps

Thanks

Adrian

"Eric Klein" <er********@mss m.edu> wrote in message
news:16******** *************** ***@posting.goo gle.com...
If you are using formail.pl, the hidden field is called "redirect".

Eric Klein
<a href="mailto:er ********@mssm.e du>er********@m ssm.edu</a>
<a

href="http://www.mssm.edu/students/kleine04">http://www.mssm.edu/students/kl eine04</a>


"The Plankmeister" <pl************ ******@hotmail. com> wrote in message

news:<3f******* *************** *@dread16.news. tele.dk>...
> > I want to write a form that when a user presses submit it carries out
the
> > submit action and then closes the browser or redirects to another

page.
>
> If I understand you correctly, then you want the form processing to
be done
> on the page locally, rather than on the server?
>
> If so... well... It is possible to write a javascript function to

'validate'
> the form and perform pretty much any 'local' operations of the
info... > However, usually for a form to be of any use it needs to send its data to
> the server.
>
> If all you want to do is rewrite the form in a fancy way so that it

looks
> nice, you can do that and still submit the form data to the cgi
script. > However, getting it to redirect to another page after submission is

another
> matter... I'm pretty sure that you cannot change that behaviour, as upon > processing the cgi script, its output is sent to the browser directly. So
> unless you can modify the cgi script, you're stuck. Unless there is

a > parameter you can pass to the cgi script that will redirect it

somewhere.
> Which is doubtful.
>
> HTH.
>
> P.

Jul 20 '05 #10

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

Similar topics

3
3696
by: Patchwork | last post by:
Hi Everyone, Please take a look at the following (simple and fun) program: //////////////////////////////////////////////////////////////////////////// ///////////// // Monster Munch, example program #include <list>
4
2815
by: ³\¥\»\ | last post by:
I have reviewed all famous and mature CMS but there are ALL too complicated, too fancy and the result is that you can not totally control what you want in your website. I hope there is a CMS with: 1. Open Source, Web Standard Compliant, XHTML, CSS... not using table to design layout. 2. PHP + MySQL base, can output static XHTML+CSS. 3. Minimal learning curve. What I want is looking for a simple CMS to maintain my websites. They are
6
2158
by: francisco lopez | last post by:
ok , first of all sorry if my english is not so good, I do my best. here is my problem: I don´t know much javascript so I wrote a very simple one to validate a form I have on my webpage. could you please have a look at the following script: ------------------------------------------------------------
7
1199
by: Jim H | last post by:
I'm new to gui programming. I'm just doing some testing with forms. I've dropped a com control on a form. When a user clicks and holds the mouse down on the control I'd like to drag the form around with the mouse. How would I do this? Even is it were a simple control like a label or panel, how would I do this? I guess it comes down to 2 questions: 1. How do I get mouse movement messages if the control does not offer these...
5
2631
by: Stephanie_Stowe | last post by:
Hi. I am trying to get used to AS.NET. I have been doing ASP classic for years, and am now in a position to do ASP.NET. I am in the stumbling around until I get my bearings phase. I hope you will bear with me. I am going through the QuickStart. After reading a little, I am trying to implement a simple page on a simple project I have made up. I have a page called default.aspx. I want it to load a list of user names from a SQL database...
6
1439
by: Brian | last post by:
Hello, I am using a beginners book on VB .net and already stumped....when using this code (below) , it will tell me that MsgBox is not valid. This is a very simple program and I can't figure out what the problem is: Public Class Form1 Inherits System.Windows.Forms.Form
6
2522
by: kamazoo | last post by:
I have no programming experience whatsoever, but nevertheless am I currently responsible for an update of a website, where a few hotels can be booked using an orderform. The website is built with Frontpage and the orderform calls a rather simple asp-script, which basically just defines a few parameters and inserts these into an email, which is sent to the booking department. The orderform lists the different types of rooms that can be...
1
8139
by: tomer.ha | last post by:
Hi there, I'd like to send emails from a Python program using Simple MAPI. I've tried this code: http://mail.python.org/pipermail/python-list/2004-December/298066.html and it works well with Outlook Express 6 and Thunderbird 1.5, but it doens't work at all with Microsoft Outlook 2007. I keep getting this message: "WindowsError: MAPI error 2". I don't want to use Extended MAPI because it doesn't support thunderbird not OE. Therefore,...
6
28872
kenobewan
by: kenobewan | last post by:
Congratulations! You are one of the few who realise that over 80% of errors are simple and easy to fix. It is important to realise this as it can save a lot of time. Time that could be wasted making unnecessary changes, that in turn can cause further problems. Programming is a humbling experience. An experience that causes one to reflect on human error. One major cause of these errors is syntax, syntax, syntax. We tend not to notice when we...
0
9563
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
9386
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
10144
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...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
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
9822
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...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
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...
3
2793
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.