Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

page after web submit form...

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
michaeldi
Asked:
michaeldi
  • 10
  • 7
  • 5
  • +2
1 Solution
 
knightEknightCommented:
there is no ACTION in your form ...
do this:

<form METHOD="POST" ACTION="thankyou.htm">
0
 
knightEknightCommented:
0
 
lexxwernCommented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
michaeldiAuthor Commented:
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
 
knightEknightCommented:
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
 
webwomanCommented:
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
 
michaeldiAuthor Commented:
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
 
knightEknightCommented:
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
 
michaeldiAuthor Commented:
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
 
knightEknightCommented:
change "Submit" to "onSubmit"
0
 
knightEknightCommented:
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
 
knightEknightCommented:
aaaahh, left out the leading <

<form ...
0
 
webwomanCommented:
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
 
knightEknightCommented:
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
 
michaeldiAuthor Commented:
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
 
michaeldiAuthor Commented:
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
 
webwomanCommented:
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
 
andrivCommented:
You can not use the 'post' method to go to an html file change the method to 'get'

<form method='get'...
0
 
lexxwernCommented:
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
 
lexxwernCommented:
So please tell us that will your mail program change the page or not(most programs can).

lexxwern
0
 
andrivCommented:
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
 
lexxwernCommented:
andriv i said that right in my first comment.

lexxwern
0
 
lexxwernCommented:
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
 
andrivCommented:
Too many comments, I get lazy in the reading. Sorry bout that.
0
 
webwomanCommented:
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
 
michaeldiAuthor Commented:
Well belive it or not its now working......
0
 
knightEknightCommented:
that is because you now have an action in the form ... just as everyone here suggested from the beginning.
0
 
webwomanCommented:
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
 
knightEknightCommented:
... 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
 
michaeldiAuthor Commented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 10
  • 7
  • 5
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now