FP02 & JavaScript

  • Thread starter Thread starter Donna
  • Start date Start date
D

Donna

A friend sent me a snippet of JavaScript so that I could use it in place
of mailto: to avoid the spam bots. He said to copy and paste the code
where the mailto was found in my html page. I have tried this several
times, but the first problem is that the JavaScript is showing on the
preview page (not hidden as code). I admit that I don't know any html
basically and was wondering if someone could help. For instance, there
is an href:mailto: lurking on my index page at
http://www.donnamcmenamin.com

Could some kind soul instruct me further as to exactly how to place this
code there? Thanks.

Here's the code.

<script language="JavaScript"><!--
var name = "yourname";
var domain = "yourdomain";
document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
document.write(name + '@' + domain + '</a>');
// --></script>
 
They forgot to tell you one part.

<script language="JavaScript">
<!--
var name = "Donna"
var domain = "donnamcmenamin.com"
document.write('<a href=\"mailto:' + name + '@' + domain + '\">E-mail<');
document.write(name + '@' + domain + '</a>');
// -->
</script>

The word E-mail as added to the third line will
be the clickable link.
You will have to paste the script into a cell so
you can position E-mail where you want it.

hth
 
For the life of me, I still can not make this work. Does this entire
thing go together, or is the first part put in the head or somewhere
else? Are there brackets missing somewhere? All of the text below keeps
appearing on my page as viewed (not as code that you can't see).
 
Copy the code to notepad, and then from there to FP in the Html (Code) View at your insertion point in the page

--




| For the life of me, I still can not make this work. Does this entire
| thing go together, or is the first part put in the head or somewhere
| else? Are there brackets missing somewhere? All of the text below keeps
| appearing on my page as viewed (not as code that you can't see).
|
| Steve Easton wrote:
| > They forgot to tell you one part.
| >
| > <script language="JavaScript">
| > <!--
| > var name = "Donna"
| > var domain = "donnamcmenamin.com"
| > document.write('<a href=\"mailto:' + name + '@' + domain + '\">E-mail<');
| > document.write(name + '@' + domain + '</a>');
| > // -->
| > </script>
| >
| > The word E-mail as added to the third line will
| > be the clickable link.
| > You will have to paste the script into a cell so
| > you can position E-mail where you want it.
| >
| > hth
| >
|
 
Must be something weird as my href to email is embedded into a gif, so I
still have not been able to make it work. Guess the spam bots are going
to find me again. Thanks anyway.
 
Back
Top