473,809 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide email address with image as link

I'm hiding the email address on a website with this javascript which
works fine:
---------------------------------
<p>Send your comments and questions to our

<script language=javasc ript>

<!--

var contact = "Newsletter Editor"

var email = "news"

var emailHost = "netmechanic.co m"

document.write( "<a href=" + "mail" + "to:" + email + "@" + emailHost+
">" + contact + "</a>" + ".")

//-->

</script>

</p>
---------------------------------
How can I make an image instead of the text as a link to start this
script?

Thanks in advance

Mar 9 '06
17 2171
Thomas 'PointedEars' Lahn wrote:
1. There is no client-side script support, the script is filtered by a
proxy, [...]


.... or by a "desktop firewall", or it is rendered not working by that
(such as with Norton InSecurity). And probably I forgot something more.
PointedEars
Mar 10 '06 #11
The "PointedEar s" must be your horns. Oh, and by the way, here is a
word you obviously need the definition to, must be the ONLY thing you
don't know, right?

------------------------------------------------------

ad·ver·tise
v. ad·ver·tised, ad·ver·tis·ing, ad·ver·tis·es
v. tr.

To make public announcement of, especially to proclaim the qualities or
advantages of (a product or business) so as to increase sales.

------------------------------------------------------

Me providing a link to a free tool I wrote that has no marketing on it
that can help people better secure their email links is a NICE and
POLITE thing that I do to HELP people. It is certainly not
"unsolicite d advertising". They can even take it and use it
themselves if they want. I don't care. (I capitalized the "big
words" you might not understand).

Well, I am off to help other people, I am sure I will see a response
following this outlining many ways that nothing I submit will work.,
just like you do on everyone else's messages. Sure hope you don't
talk to people in person the way you do on here.

Here's a challenge for you. Write one nice response to a user, come
back here and post the link so I can see that you actually helped
someone out. My bet is that I will never see anything.

Later pessimist

PS, your site http://www.pointedears.de/ needs a lot of work bro.

- Peter Schmalfeldt

Thomas 'PointedEars' Lahn wrote:
Manifest Interactive wrote:
First I must apologize for users like PointedEars who somehow think
they are making a contribution by bad mouthing people who need help.
It seems every post they make does nothing to further anyone's
knowledge.


At least I /know/ what I am talking about.

You are not helping the OP by posting this "solution", you are hurting
him/her in the mid-term. Because e-mail communication will be impossible
for many, if not most, of his/her users while you give the false impression
that this would be a viable approach that serves at least many users.
There is a word for that: incompetence.
Here is how you would fix your code to use an image:

<script language=javasc ript>

^^^^^^^^^^^^^^^ ^^^^^
var contact = "Newsletter Editor";
var email = "news";
var emailHost = "netmechanic.co m";
document.write( "<a href='mailto:"+ email+"@"+email Host+"'><img
src='http://groups.google.c om/groups/img/groups_medium.g if' width='150'
height='58' border='0'>"+co ntact+"</a>");

^^^^
The markup is not Valid, and therefore not supposed to be interoperable.

1. The `language' attribute is deprecated long since (December 1999),
the `type' attribute is required. The language attribute is not
Valid in HTML 4.01 Strict, XHTML 1.0 Strict, and XHTML 1.1.

2. mailto: is known to be highly unreliable (IOW: known not to work).

3. Writing the link with client-side scripting and so introducing a
dependency on that technique makes it even worse.

4. The `img' element requires the `alt' attribute, as text alternative
if the image cannot be displayed.

5. ETAGO delimiters </ must be escaped within CDATA element content, or
the element is considered to end prematurely by the markup parser,
causing a syntax error for the script engine here.

So there are the following possibilities:

1. There is no client-side script support, the script is filtered by a
proxy, or the client works strictly standard compliant:

The user sees exactly nothing, and depending on the strictness of
the parser, if there is client-side script support, and the script
is not filtered, the user gets a nice error message, too.

2. There is client-side script support, the script is not filtered,
and despite the markup being not Valid the script is executed, but

a) the user is blind or visually impaired, and therefore can not find
the link (there is no text that can be interpreted by a Braille line
or read to him aloud by a screenreader);
b) there is no e-mail client installed;
c) the HTML user agent (UA) does not support mailto: URIs;
d) the e-mail client is not configured with the UA to handle mailto: URIs

Where each of b) to d) is highly likely with users having a Web mail
account.

For the infinitesimal tiny rest of users, this nonsense actually works.
Big time.
[unsolicited advertising]
[top post]


FOAD!


PointedEars


Mar 10 '06 #12

Manifest Interactive schrieb:
Here is how you would fix your code to use an image:

<script language=javasc ript>
var contact = "Newsletter Editor";
var email = "news";
var emailHost = "netmechanic.co m";
document.write( "<a href='mailto:"+ email+"@"+email Host+"'><img
src='http://groups.google.c om/groups/img/groups_medium.g if' width='150'
height='58' border='0'>"+co ntact+"</a>");
</script>


Manifest Interactive, thanks a lot, but when I copy this script into my
html the image is not displayed. It only works with a text link. I
tried it several different ways, really strange...

Mar 10 '06 #13
Greetings,

Are you copying this script inside your body tag? Also, make sure that
you removed all the line breaks that this forum will put in the code.
In all total there should only be 6 lines of code including the <script
language=javasc ript> and </script> tags. If you have more than that,
then that is the problem.

Here is a link to a sample page I put up on my site for you:

http://www.manifestinteractive.com/u...imagelink.html

Just copy that code if you want. Hope this solves your problem.

- Peter Schmalfeldt

HornyLaBelle wrote:
Manifest Interactive schrieb:
Here is how you would fix your code to use an image:

<script language=javasc ript>
var contact = "Newsletter Editor";
var email = "news";
var emailHost = "netmechanic.co m";
document.write( "<a href='mailto:"+ email+"@"+email Host+"'><img
src='http://groups.google.c om/groups/img/groups_medium.g if' width='150'
height='58' border='0'>"+co ntact+"</a>");
</script>


Manifest Interactive, thanks a lot, but when I copy this script into my
html the image is not displayed. It only works with a text link. I
tried it several different ways, really strange...


Mar 10 '06 #14
HornyLaBelle wrote:
Manifest Interactive schrieb:
Here is how you would fix your code to use an image:
[Invalid code]


Manifest Interactive, thanks a lot, but when I copy this script into
my html the image is not displayed. It only works with a text link.
I tried it several different ways, really strange...


Blind leading the blind ... It would be funny if it would not be so sad.

FWIW, you are looking for a (server-side) form mailer, such as
<URL:http://formmailer.com/ (or write your own in any server-side language;
I prefer PHP), not mailto: or client-side scripting, and certainly not the
nonsense provided by the incompetent spammer posing here. This way, your
e-mail address is known only server-side, not to the users (or a potential
spammer). And _all_ of them will be able to send you e-mail anyway. By
using POST requests and server-side sessions, you can successfully prevent
most attempts spamming to the resource the form points to.
HTH & HAND

PointedEars
Mar 10 '06 #15
Thomas 'PointedEars' Lahn said the following on 3/10/2006 10:36 AM:
and certainly not the nonsense provided by the incompetent spammer posing here.


Everything you said was 100% on the mark except the above. Nothing that
he has posted would qualify as "spam" and whether he is "posing" or
"posting" (I assume that to be a typo but it may be intentional) he
still hasn't spammed this group. It goes back to your typical behavior
of name calling when someone disagrees with you.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Mar 10 '06 #16

Manifest Interactive schrieb:
Are you copying this script inside your body tag? Also, make sure that
you removed all the line breaks that this forum will put in the code.
In all total there should only be 6 lines of code including the <script
language=javasc ript> and </script> tags. If you have more than that,
then that is the problem.


Manifest Interactive, thank you very much. The line breaks were the
problem. Now it works.

Mar 10 '06 #17

Horny LaBelle wrote:
Manifest Interactive schrieb:
Are you copying this script inside your body tag? Also, make sure that
you removed all the line breaks that this forum will put in the code.
In all total there should only be 6 lines of code including the <script
language=javasc ript> and </script> tags. If you have more than that,
then that is the problem.


Manifest Interactive, thank you very much. The line breaks were the
problem. Now it works.


You are welcome,
- Peter Schmalfeldt

Mar 12 '06 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2779
by: sergio | last post by:
Hi all, I have created the following script that will show/hide a menu based on checkboxes. It works fine in Opera but not on IE6! Does anybody knows a workaround this problem? Thanks for your response. Sergio ------------------------------------------------ <script language="JavaScript" type="text/javascript">
117
11901
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
4
5194
by: web_design | last post by:
I put this together from some other scripts I am using on a site. I'm trying to make a better email hiding script. It isn't working. Also, it causes Internet Explorer 6 SP2 to block the script as "active content". :( The idea is that if the user doesn't have JavaScript enabled, they will see an image of the email address (that can't be read by email harvesting programs). If JavaScript is enabled, the image will be hidden and the...
1
1704
by: frekster | last post by:
Hi. Looking for some feedback on how to prevent a specific spam attack. I have a form for a person to subscribe to a mailing list and they can type in their email and click submit to subscribe. They then are sent an email asking them to click a link to confirm. how can I prevent a spammer from simply looping through thousands of emails and populating my email list table with thousands of records and crashing the system?
4
4234
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however I would really like to use linked images instead to do the following: - When open.gif is clicked, the contents of the div show and open.gif is swapped with close.gif - subsequently, when close.gif is clicked, the div contents get hidden
1
2475
by: Mahernoz | last post by:
Hi Friends, I have a Registration page which uses Asp.net CreateUserWizard Control. Now I want to send a unique value(a guid) by which i can be sure that the email address is of that user only. I will provide a Textbox in the next step which the user has to input so that his email address is confirmed. Do you know how this is done with the CreateUserWizard Control?
12
2972
by: laredotornado | last post by:
Hi, I'm using PHP 5. I was wondering given an image, a.jpg, how can I make an image that would look like you slid a white index card (which I have a file, white.jpg with the same dimensions as a.jpg) over a.jpg? Note that you'd be sliding the image from top to bottom or from left to right, but not both. Thanks, let me know if this makes sense ... it's a litlte hard to describe.
0
10792
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information inside an image, hide your complete image as text ,search for a particular image inside a directory, minimize the size of the image. However this is not a new concept, there is a concept called Steganography which enables to conceal your secret...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10379
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.