Solved

page after web submit form...

Posted on 2002-03-22
30
206 Views
Last Modified: 2010-04-09
I have put a web submit form on my webpage and I would like it once its been submitted to go to the thanks page but it doent work, can anybody tell me where ive gone wrong,,,,,http://www.bud-fisher.fsnet.co.uk/
click on the menu contact then email

Thanks in advance
Mike

0
Comment
Question by:michaeldi
  • 10
  • 7
  • 5
  • +2
30 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 6888758
there is no ACTION in your form ...
do this:

<form METHOD="POST" ACTION="thankyou.htm">
0
 
LVL 33

Accepted Solution

by:
knightEknight earned 150 total points
ID: 6888768
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6888904
okay,
your page doesn't load in NS6.2 .
and in IE is very slow.
the form didn't work.

so. i guess try "action" or perhaps parse thru your script and cheange it there.

if you post the script here, experts will help you out.


lhn
0
 
LVL 1

Author Comment

by:michaeldi
ID: 6888999
grrrr.. I dont no tried that and is just isnt playing ball any ideas...

<form METHOD="POST" ACTION="">
  <input type="hidden" name="targetpage"
  action="http://www.dimond99.freeserve.co.uk/thanks.html"
  name="mailuser" value="dimond99.freeserve.co.uk"><p><strong>1. Your

Email Address (if you
  would like returned answer) :</strong></p>
  <p><input TYPE="text" NAME="EMAIL_ADDRESS" SIZE="47"> </p>
  <p><strong>2. Enter ??????????????</strong>&nbsp; </p>
  <p><textarea NAME="SUGGESTION_MADE" ROWS="5" COLS="46">

</textarea></p>
  <p>Please submit your enquiries using this form.</p>
  <p><input TYPE="submit" VALUE="Submit"> <input TYPE="reset"> </p>
</form>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889010
I doubt that would actually send an email, though, unless the thanks.html does it for you.  How is the mail being sent?  or is it?

What errors do you see?
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6889027
Where to start?

There's no action on the form tag. It must be there if you want anything to happen. You don't use an action on the input tag.
This:
 <input type="hidden" name="targetpage"
 action="http://www.dimond99.freeserve.co.uk/thanks.html"
 name="mailuser" value="dimond99.freeserve.co.uk">
is totally wrong. No action -- and what name is it? You have TWO.

What is handling the form? Not the thanks.html, it's not the right type of page.

If this is on freeserve.co.uk, find out what form handler they have (if they have one) and set the form up to use it. If they have a form handler they should have instructions on how to use it.

You COULD set it up using a "mailto:youremail@yoursite.com" for the action -- but you'd have to do a LOT of scripting to get it to put the form data into the e-mail, and you would have no guarantee that the user would send it. Or even that they had a mail client set up.

But either way, what you have isn't going to work at all.
0
 
LVL 1

Author Comment

by:michaeldi
ID: 6889040
It sends me an email which is what I want but it doent then change the current frame to http://www.dimond99.freeserve.co.uk/thanks.html"
All I want it to do is to send me a email and then display the thanks page.

~Belive it or not I actually got it working fine on my other site at www.dimond99.freeserve.co.uk/

Mike
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889052
ok, try this:

remove the action URL, and instead do this:

action="" onSubmit='setTimeout("location=\"http://www.dimond99.freeserve.co.uk/thanks.html\"",1000);return true;' >
0
 
LVL 1

Author Comment

by:michaeldi
ID: 6889079
Ok KnightEknight tried that but didnt do anything...
Is this the correct sytax:-

<form METHOD="POST" ACTION="">
  <input type="hidden" name="targetpage"
  action=""

Submit='setTimeout("location=\"http://www.dimond99.freeserve.co.uk/thanks.html\"",1000);return

true;' >
  name="mailuser" value="dimond99.freeserve.co.uk"><p><strong>1. Your Email Address (if you
  would like returned answer) :</strong></p>
  <p><input TYPE="text" NAME="EMAIL_ADDRESS" SIZE="47"> </p>
  <p><strong>2. Enter ??????????????</strong>&nbsp; </p>
  <p><textarea NAME="SUGGESTION_MADE" ROWS="5" COLS="46"> </textarea></p>
  <p>Please submit your enquiries using this form.</p>
  <p><input TYPE="submit" VALUE="Submit"> <input TYPE="reset"> </p>
</form>
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889143
change "Submit" to "onSubmit"
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889144
no,no,no, in your form tag:

form METHOD="POST" ACTION=""
  onSubmit='setTimeout("location=\"http://www.dimond99.freeserve.co.uk/thanks.html\"",1000);return true;' >

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889146
aaaahh, left out the leading <

<form ...
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6889171
I can't believe that actually did anything, let alone send an e-mail. You're not telling it to. When I tried using the form, I got
Method Not Allowed
The requested method POST is not allowed for the URL /index.html.
Which is exactly what I'd expect.

And the ONLY reason it worked on your other site is this:
****<form METHOD="POST" ACTION="/cgi-bin/mailform.cgi">*****
  <input type="hidden" name="targetpage"
  value="http://www.dimond99.freeserve.co.uk/thanks.html"><input type="hidden"
  name="mailuser" value="dimond99.freeserve.co.uk"><p><strong>1. Your Email Address (if you
  would like returned answer) :</strong></p>
  <p><input TYPE="text" NAME="EMAIL_ADDRESS" SIZE="47"> </p>
  <p><strong>2. Enter your suggestion or recommendation to improve the site:</strong>&nbsp; </p>
  <p><textarea NAME="SUGGESTION_MADE" ROWS="5" COLS="46"> </textarea></p>
  <p>Please submit your feedback using this form, we hope to hear from you.</p>
  <p><input TYPE="submit" VALUE="Submit"> <input TYPE="reset"> </p>
</form>

NOTE WELL: There is a form handler script there. It's called in the ACTION of the form tag. If you DO NOT have something set up to handle sending the form info, it will not and CANNOT work.
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6889182
yes, as I expressed earlier.  How is that form doing anything at all since you don't have an action?  Is there some hidden javascript somewhere that is doing the work?
0
 
LVL 1

Author Comment

by:michaeldi
ID: 6889371
While thanks for you emails however, ive tried that html you sent me webwomen and sorry to say it does not send me an email or display the thanks page...  I know what you mean about working but it does work on my other site...
Ive tried this all sorts of ways around, but still cant get any where:
*******YOUR CODE******* I pasted in*******
<form METHOD="POST" ACTION="/cgi-bin/mailform.cgi">

<input type="hidden" name="targetpage"
 value="http://www.dimond99.freeserve.co.uk/thanks.html"><input type="hidden"
 name="mailuser" value="dimond99.freeserve.co.uk"><p><strong>1. Your Email Address (if you
 would like returned answer) :</strong></p>
 <p><input TYPE="text" NAME="EMAIL_ADDRESS" SIZE="47"> </p>
 <p><strong>2. Enter your suggestion or recommendation to improve the site:</strong>&nbsp; </p>
 <p><textarea NAME="SUGGESTION_MADE" ROWS="5" COLS="46"> </textarea></p>
 <p>Please submit your feedback using this form, we hope to hear from you.</p>
 <p><input TYPE="submit" VALUE="Submit"> <input TYPE="reset"> </p>
</form>


knightEknight as far as I can see theres no hidden javascipts I take it the CGI script is on freeserves server or something........
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Author Comment

by:michaeldi
ID: 6889377
if you knew how many forms Ive done that same form before.. I find it nuts that I cant get it working on a different webpage...
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6889389
You can't get it working because you don't have the same form handler -- if you have one at all.

The ONLY way you're going to get it to work is to contact whoever is hosting the site and ASK THEM what you can use. This has to be done on the SERVER. You can't set that up unless YOU control the server. You don't. So you ASK.

If they don't have a form handler, you'll have to use a mailto: and hope that the user has a mail client that will pop up a new mail window, and that they'll send it. Lots won't.
0
 
LVL 5

Expert Comment

by:andriv
ID: 6890168
You can not use the 'post' method to go to an html file change the method to 'get'

<form method='get'...
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6890336
Oh hello. You Could not get this to work on this particular page?

okay check the cgi-bin, do you see a mail program. if no get on here, http://cgi.resourceindex.com/ and then configure that to show your thanks page. You should remember that your main aim is to first SEND the EMAIL. That has to be Post(atleast in most Programs). And then a little javascript can then change your page.
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6890338
So please tell us that will your mail program change the page or not(most programs can).

lexxwern
0
 
LVL 5

Expert Comment

by:andriv
ID: 6890354
webwoman's answer is the correct answer, you are using a e-mail script provided by the hosting company called mailform.cgi. If it is not sending the email and then redirecting to another page it's because of the script. You probably have to set it to redirect to the address in the target field.
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6890428
andriv i said that right in my first comment.

lexxwern
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 6890433
maybe it wasn't clear there so, "michaeldi" can oyu post the script and experts can tell you where to modify if you cannot figure out yourself

lexxwern
0
 
LVL 5

Expert Comment

by:andriv
ID: 6890441
Too many comments, I get lazy in the reading. Sorry bout that.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6890975
He's has pages on two different hosts. One works. They have the script, they most likely gave him directions on how to set it up.

He copies the same form (with the same action) to use on A DIFFERENT host. They DO NOT have the appropriate script, or don't have it in the same place, or don't have one at all. So, naturally, it doesn't work.

So he messes around with it, having absolutely no clue what he's doing, and it still doesn't work.

He doesn't own the host, doesn't have access to the server, doesn't understand how forms work, possibly isn't very familiar with HTML (from the errors, this would seem to be the case).

WE can't do anything to get this to work. He MUST ask whoever is hosting this particular site and find out FROM THEM what form handler (if any) they have and how to use it.

There really isn't anything WE can do here until he finds that out.
0
 
LVL 1

Author Comment

by:michaeldi
ID: 6893442
Well belive it or not its now working......
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6893896
that is because you now have an action in the form ... just as everyone here suggested from the beginning.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 6893958
It's still not going to work unless he's got the RIGHT action in the form...

Did you contact the hosting service and ask them?
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6893970
... this time he is posting to a mail cgi ... which no doubt takes the URL as a parameter, and then redirects after sending the mail.
0
 
LVL 1

Author Comment

by:michaeldi
ID: 6895848
It waas really hard to chose who to give the points to because I kinda worked it out myself but from the comments you made.  The soultion was regarding the form action which knightEknight suggested first therefore on the basis it would be fair to give him the points.

Thanks for all your comments, thanks for keeping with me on this one(webwomen)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now