Re: The script in HTML form is not working
|
Henri Teipel |
|
12/20/2007 9:47:35 PM |
The problem is that you tried to put the code in a WYSIWYG editor, an editor that tries to make exactly what you put on the screen show up on the web page. Instead, save this text in notepad or wordPad or textWrangler or some such. This should be either a plain text editor designed to manipulate words without making them look fancy, or a code editor. Either way, the editor should not attempt to alter this code. (btw, you will need to remove the line numbers, this website adds that to the code as do some code editors, they are just there for reference and shouldn't be saved).
When you go to save if you use notePad or wordPad, you shoul d put the name of the file in quote marks but select save as "plain text" when you g et the option. Does this make sense? Try that and let me know. Post Comments |
|
Thanks so much, that worked.
The only thing is, maybe I misunderstood this forum bec ause what I wanted to do was use the csv file as a database to store collected information. I a lso want the user to see a thank you page after they fill out the form. Am I on the right path?
Post Comments |
|
You can definitely add a thank you note or any valid HTML code to the bottom of the script (past the last "%>"). You can also remove the little notes about what has been saved (I just put those in for visual confirmation). You can even redirect the user to a thank you page at the bottom if you like (but I think this only works if the first page hasn't sent any information to the browser yet). The syntax for a redirect is: Code: ( asp ) -
response.redirect "thankYouPage.html"
Glad you got it working. Post Comments |
|
Re: The thank you page working!
|
Pullatti Jamaica |
|
12/20/2007 9:50:27 PM |
Great! I got the thank you page working.
Now the only problem is the info is not being saved in the cvs file. All that shows up is:
first_name, last_name, email, address1, address2, city, state, zip, country
Is something wrong in the script?
>Thank you thank you thank you!!! Post Comments |
|
Actually, now there is an error when I submit the form. It says:
Scripting.FileSystemObject.1 (0x800A0035) File not found. /forms/formhandler.asp, line 56
This is line 56: set objTXT = objFSO.openTextFile(filePath, 2, True) 'opens the text file for ' writing response.write "field names enterd:<br>" & vbN ewLine Post Comments |
|
Re: Not in a position to check it
|
Henri Teipel |
|
12/20/2007 9:53:48 PM |
So it went form working to only listing the field names, to not working at all? I did test it and got it to do everything I said it did. I'm not in a position to check right now, but try deleting the csv file and starting afresh, or try starting the csv file in notepad (it should just be a plain text file like you saw earlier). I will try to check it again tomorrow.
Post Comments |
|
I was able to get it working okay.
Thanks for all your help. It is very greatly appreciated! Post Comments |
|