document.write("'mailto:' + name + '@' + domain'");
and the form begins:
This just returns 'mailto:' + name + '@' + domain' in the browser window, and doesn't mail anything.
I know mailto isn't the best way to do this, but the specification given is that it has to be a mailto form, and use the code to spam proof the email address.
If anyone could give me some suggestions on how to accomplish this I'd really appreciate it. I believe document.write isn't the correct thing to be using, but I am unsure what to replace it with.
Thanks very much for any help.
1. Give your form an ID, like <form id="myForm">
2. After your form, add this:
If that doesn't work, try:
document.getElementById('myForm').action = "mailto:" name + "@" + domain;
Hope that helps .
document.getElementById('myForm').setAttribute("action", "mailto:" + name + "@" + domain);
Thanks very much for the reply, that seems to have worked perfectly.
Can't tell you how much I appreciate the help
Last edited by wolfestone; 03-25-2007 at 04:00 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)