I've been trying to write a JavaScript form that will thwart bots that crawl the site to harvest email addresses. I rather thought that what I've written should work, but nothing happens when I click the send button. Can somebody check my code?
"This is supposed to be a happy occasion... Let's not bicker and argue about who killed who."
-- The King of Swamp Castle, Monty Python and the Holy Grail
"Nothing of consequence happened today. " -- Diary of King George III, July 4, 1776
"This is not bad; this is a conspiracy to remove happiness from existence. It seeks to wrap its hedgehog hand around the still beating heart of the personification of good and squeeze until it is stilled."
-- Chuck Sonnenburg on Voyager's "Elogium"
Because I don't want to put a complete, fully-formatted email address into the file where a bot crawling the site could pick it out.
If the bot can't see "email.name@service.net" anywhere in the file, it can't send spam to the email address.
"This is supposed to be a happy occasion... Let's not bicker and argue about who killed who."
-- The King of Swamp Castle, Monty Python and the Holy Grail
"Nothing of consequence happened today. " -- Diary of King George III, July 4, 1776
"This is not bad; this is a conspiracy to remove happiness from existence. It seeks to wrap its hedgehog hand around the still beating heart of the personification of good and squeeze until it is stilled."
-- Chuck Sonnenburg on Voyager's "Elogium"
Hugh wrote:Um, no time to run the code, but you have a syntax error in this line:
eBody = "&body=" + mail_form.bod.value";
It's the extra quote sign at the end.
Also, I think you need to escape() strings such as "No message".
Hope this helps.
It was the extra quote. It runs now.
Many thanks.
"This is supposed to be a happy occasion... Let's not bicker and argue about who killed who."
-- The King of Swamp Castle, Monty Python and the Holy Grail
"Nothing of consequence happened today. " -- Diary of King George III, July 4, 1776
"This is not bad; this is a conspiracy to remove happiness from existence. It seeks to wrap its hedgehog hand around the still beating heart of the personification of good and squeeze until it is stilled."
-- Chuck Sonnenburg on Voyager's "Elogium"