Page 1 of 1

Feedback Form

Posted: Tue Mar 09, 2010 9:38 pm
by Mooncat
I want to have a feedback form, (so readers can complain) which sends an email to an account I've set up for this purpose. Page here:

http://astrocat.exactpages.com/feedbackform.html

It looks OK but it doesn't work :sad: Can anybody here see why?

Posted: Tue Mar 09, 2010 10:01 pm
by village idiot
WOT blocked it saying it had a poor reputation :roll:

Posted: Tue Mar 09, 2010 10:36 pm
by Mooncat
It's just a simple page with some basic HTML and Javascript. Are ou using Internet Explorer?

Posted: Tue Mar 09, 2010 11:06 pm
by dave.m
It opens in Firefox 3.6
The Page Info shows:
Address: http://astrocat.exactpages.com/feedbackform.html
Type: text/html
Render mode: Quirks mode
Encoding: ISO-8859-1

Security states:
Not Encrypted, the site astrocat.exactpage.com does not support encryption for the page you are viewing.

Can't help you but that is what info I got. Should a report page be encrypted?

dave

Posted: Tue Mar 09, 2010 11:10 pm
by dave.m
Just tried it in IE8 (64bit) and sent a test reply.
The Status bar showed as 'Done but with errors on page' after I had sent it.

I'll try a reply using Firefox next.
dave

I have sent a reply using Firefox.

Did notice that in IE8, above the name box in the form, there was a Search box, this did not show in the Firefox version.

dave

Posted: Tue Mar 09, 2010 11:21 pm
by dave.m
MC,
This is how it displayed:

Sorry about the quality but I was rushing to get my brew.

The search box is only in the IE version.

dave

Posted: Tue Mar 09, 2010 11:26 pm
by Mooncat
That is how it looks for me as well. I'll just see if any messages have been received.

Posted: Wed Mar 10, 2010 1:07 am
by thescruff
I sent one :roll:

Posted: Wed Mar 10, 2010 9:10 am
by chat_to_rich
I did a view source on the page and there are a few coding errors. I copied the source to my machine and changed the javascript function as below. It now pops up an email window with information from the boxes in it. I've included a bit of code form above and below the function so you can see where it fits in. Let me know if this isn't what you wanted. You'll need to reset the email address.

<html>
<head>
<title>Form</title>

<script>

function SendEmail()
{
var toaddy = 'xxmontycanal@xxoperamail.com';
var subject = 'JS Form Submission';
var mailer = 'mailto:' + toaddy + '?subject=' + subject + '&body=' +
'Name is: \n\t' + document.jsform.visitorname.value +
'\n\n' +
'%0DEmail is: \n\t' + document.jsform.email.value +
'\n\n' +
'%0DMessage: \n\n' + document.jsform.message.value +
'\n\n';
win = window.open(mailer,'emailWindow');
if (win && win.open &&!win.closed) win.close();
}
</script>
<0Catch></noscript></div></xmp></style>

Posted: Wed Mar 10, 2010 9:20 am
by chat_to_rich
I've just noticed some of the code is altered when I post. The bit that says script should say script type="text/javascript"

Posted: Wed Mar 10, 2010 11:25 am
by Mooncat
chat_to_rich wrote:I've just noticed some of the code is altered when I post. The bit that says script should say script type="text/javascript"

Thamk you. I'll edit my page, and let you know.

Posted: Wed Mar 10, 2010 12:38 pm
by Mooncat
I edited the script, and uploaded it to the host site. But it does not send an email message automatically. though the message in the window looks better than mine did. There isn't a SEND button to send it.

I would prefer that users didn't leave my site to send me feedback.

Posted: Wed Mar 10, 2010 1:05 pm
by chat_to_rich
If you don't want to go down the mailto route, where the browser invokes the default mail client to send the email, (see here for details http://www.javascript-coder.com/javascr ... form.phtml) I would use a server-side script (PHP, Perl, ASP/ASP.NET) to send the email for you. I'm not a professional web developer, but if it's of any use I'm familiar with ASP and ASP.NET. You might also find this useful http://www.html-form-guide.com/email-form/

Posted: Wed Mar 10, 2010 2:05 pm
by chat_to_rich
You can use this site to generate email forms in ASP, Perl and PHP http://www.tele-pro.co.uk/scripts/contact_form/ If you google "email form generator" there are others.

Posted: Wed Mar 10, 2010 5:23 pm
by Mooncat
Thank you, chat to rich. It looks as if I am up the creek with my script, so I'll be checking out the PHP route.