PDA

View Full Version : HTML form not working anymore...


ANHS
6-26-02, 01:12 PM
STUPID ME!!!

I have 3 forms that worked perfectly before last night. I had to make adjustments in one of them for tonight and I did the changes in Front Page (stupid stupid me)

Not remembering that Front Page adds useless stupid HTML codes when you save inside Front Page. I remembered I should have modified the HTML in Notepad but I forgot...

Anyways, I was hoping someone who know HTML fairly well could look at the coding for my form and tell me what the problem could be because I kind of need that form to be working by 9pm EDT tonight.

Here is the link to the form: http://www.anhs.qc.ca/ANHSContrats.htm

Here is what the form DOESN'T do now:
1- When you click on the submit button (Confirmer) usually you would have a dialog window that would pop up telling you that the form is being sent by email and that the information will be read...etc...
2- The form has to be sent by email to: contrats@anhs.qc.ca

Thans for any help on this, I really appreciate!

rainbore
6-26-02, 02:51 PM
I don't know anything about Front Page, but the only thing that looks bad to me is the <FORM> tag. I don't recognize the onSubmit code you're using. If its a Front Page extension, I can't help you, but since nothing seems to happen when you press the SUBMIT button, the <FORM> tag looks like the culprit. The rest of the HTML on the page looks OK to me.

If you can't repair the <FORM> tag in time and you need a quick and dirty fix, you might want to look into using a script called "FormMail.pl" which essentially gobbles up everything in a form and EMails it to a specified EMail address. Set the form's ACTION parameter to:

/powweb-bin/FormMail.pl

and set up another tag in your form:

<INPUT TYPE="HIDDEN" NAME="recipient" VALUE="joe@doakes.com">

replacing the VALUE with the EMail address you want to receive the form.
You might have to set up a few more INPUT tags - I forget the details.
You'll find documetation on this script at:

http://www.worldwidemart.com/scripts/formmail.shtml

and over in the Perl/CGI bulletin board here. Good luck!

Richard L. Trethewey
www.rainbo.net

ANHS
6-26-02, 04:48 PM
This whole form (and also my other 2 forms) are written to work as a Javascript. I did not want to install formmail because I don't know anything about scripts and it sounded too complicated for me at first so I asked a guy to help me out with making forms that wouldn't need formmail.pl and he came up with this coding for the page.

Anyways, I'll see if anyone else has any idea on how the coding might need to be changed to make my forms work.

Thanks for the help anyways!

If anyone else has a tip on what could be wrong, please email me at: steff13356@sympatico.ca

ANHS
6-26-02, 05:46 PM
Never mind...I found the problem...

For those interested in knowing what the problem is, if you go look at the code of the form, Front Page added a </form> tag after saving it IN Front Page.

The added tag was a couple lines under another tag that started with <form....bla bla bla, etc...> of course and since the form is written in javascript, Front Page could not figure this out and added the </form> tag itself and made the form not work anymore.

Only had to remove the superfluous tag and VOILA! the form works!

Those of you interested in using forms WITHOUT having to use formmail.pl or something else, you can check out the coding for that form and tweak it to your liking. BUT, DO NOT SAVE IT IN FRONT PAGE...instead, if you change the code, make sure you do so using Notepad or something.

PS: I won't give any support on modifications you bring to the form yourself as I am not an HTML mogul and basically know very little about that stuff so don't come to me with questions unless they have to do with this topic when it started :)

NMS
6-26-02, 05:47 PM
I know this is a stupid question but...

DO YOU HAVE A BACKUP??....WHY NOT??

ANHS
6-27-02, 02:16 AM
It was indeed a stupid question...and didn't need to shout out loud...

Basically my backup was the original on my website :) BUT, usually I test all my pages before updating them on my website except I hadn't done this in a long time so I kond of forgot...happens to anyone and I'm sure it happened to you too once in your website creations...

Anyways...

NMS
6-27-02, 03:27 AM
well...at the same time that I was 'shouting out loud'...you have solved your problem.... :)

good job;)