Shoutbox

javascipt / html - help - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: javascipt / html - help (/showthread.php?tid=27765)

javascipt / html - help by Web_Master on 06-27-2004 at 07:15 AM

hello, i read outa some mag that got given to me about email spamming.   (PC Authority or something) It says about how spiders crawl the net and get emails from websites, it then has a javascipt which makes the spiders skip the email. I followed the insturction in the book but i still cant get to work.
Below is the code;

1. how do i make it come up on the page and work?
2. tell me what was wrong.

<script language="javascript"><!document.write('<ahref=mailto:'+'jacobcass'+'@'+'hotmail.com>user'+'@'+'hotmail.com</a>')</script>

THANKS!


RE: javascipt / html - help by WDZ on 06-27-2004 at 07:59 AM

Change "ahref" to "a href" and remove the "<!" and it should work. :p


RE: javascipt / html - help by Web_Master on 06-27-2004 at 10:02 AM

touche! :) thanks

still doesnt explain the mistake the magazine made.


RE: javascipt / html - help by Mnjul on 06-27-2004 at 10:06 AM

<! should be <!--, to remark off the java scripts in case browser didn't recognize it at all

"ahref" should be "a href" of course, because it's an A tag with HREF attribute/property :)


RE: javascipt / html - help by CookieRevised on 06-27-2004 at 11:54 AM

What the magazine should print is:
<script language="javascript">
<!--
document.write('<a href=mailto:'+'jacobcass'+'@'+'hotmail.com>jacobcass'+'@'+'hotmail.com</a>')
-->
</script>

Anyways, this will stop indeed some spiders/crawlers, but certainly not all! It will only stop those who look at the html source, not the ones who look at the html-page itself.


RE: javascipt / html - help by RaceProUK on 06-27-2004 at 08:08 PM

Try

code:
<a href="javascript:launchMail()">E-mail Me</a>
with
code:
<script type="text/javascript">
<!--
function launchMail()
{
    var email = "<user-name>";
    email = email + "@";
    email = email + "<domain-name>";
    window.location = "mailto:" + email;
}
// -->
</script>
Put the <script> part between the <head> tags, and the <a> anywhere where you want your e-mail link.

This code works: it's lifted from my own webpage.
RE: javascipt / html - help by saralk on 06-27-2004 at 09:11 PM

y cant u just make a php script which sends the e-mail?


RE: javascipt / html - help by RaceProUK on 06-27-2004 at 09:15 PM

PHP is server-side yes? Therefore, is t places more load on the server. A JavaScript/HTML solution puts the load on the client, which I believe is better all round.


RE: RE: javascipt / html - help by Web_Master on 06-28-2004 at 05:57 AM


quote:
Originally posted by CookieRevised
What the magazine should print is:
<script language="javascript">
<!--
document.write('<a href=mailto:'+'jacobcass'+'@'+'hotmail.com>jacobcass'+'@'+'hotmail.com</a>')
-->
</script>

Anyways, this will stop indeed some spiders/crawlers, but certainly not all! It will only stop those who look at the html source, not the ones who look at the html-page itself.


If you changed the code to as below then the spiders shouldnt pick it up

<script language="javascript">
<!--
document.write('<a href=mailto:'+'jacobcass'+'@'+'hotmail.com>email'+'me</a>')-->
</script>