469,342 Members | 6,008 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,342 developers. It's quick & easy.

how to replace text on a page using Javascript code

Hi,

I recently posted "problem with Javascript code from Include"
Thanks to response I have now fixed the problem.

This is to ask how to solve my next problem/step.

I am using javascript to create my email address on the fly so as to
avoid SPAM harvesters.

I like to see where I have placed the email address during design time.
What I am doing now is setting the marker text as hidden so it appears
at design time but is invisible at run time.

I use this code to display the spot followed by the call to create the
address.
Send Email to: <span style="visibility: hidden">mailAddyFor:
'Address_for_Info' </span>
<script language="javascript"
type="text/javascript">generate_address('Address_for_Info')</script>

The problem with this is that even though the marker is set to
invisible it still holds space and forces the address to appear away
from the label "Send Email to: ".

It appears as;
"Send Email
to:__********************************************* *@domain.com"
Note: the "_" are actually spaces.

Instead of; "Send Email to: Ad**************@domain.com"

Is there a way I can remove the entire marker text programmatically
(say from within the code that creates the address)?

Cheers
TonyS.

Jul 23 '05 #1
3 1776
Tony Strazzeri wrote:

Is there a way I can remove the entire marker text programmatically
(say from within the code that creates the address)?

Setting its style to display:none should be good enough for what you want.
Jul 23 '05 #2
Thank you. That works a treat!

Cheers
TonyS.

Jul 23 '05 #3
Tony Strazzeri wrote:
Thank you. That works a treat!


No, it does not.
PointedEars
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Frank | last post: by
4 posts views Thread by Monty | last post: by
5 posts views Thread by Casey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.