473,473 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1990
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Barnes | last post by:
Does anyone know of a good way to use the JavaScript string.replace() method in an ASP form? Here is the scenario: I have a form that cannot accept apostrophes. I want to use the replace() so...
2
by: Barnes | last post by:
Hi, Can anyone please tell me how I can use the replace method to replace a character if it occures in more than one textbox without having to write separate function for each textbox. The...
4
by: Frank | last post by:
Hi, I'm not familiar with JavaScript but have to fix a problem. Please see below part of the HTML code with contains my question: The problem is that I have to display a path in the showIt...
4
by: Monty | last post by:
Hi, I have the following in my HTML document... <span id='prompt'>File Saved</span> All I want to do is replace the above "File Saved" text on my page with "Upload File" after about 5 seconds...
16
by: juglesh | last post by:
Hello, I need to look through the text on a page and replace certain words with an image or other word something like: read document find all instances of the word "blah" change all...
5
by: gbit | last post by:
Hi, I have a web page describing a procedure using generic names. At the top of the page I have a text box. When the user enters a specific name in the text box, I would like the page to...
5
by: Casey | last post by:
Hello, Can someone give me specific code to replace text on a page using server side javascript? I need to use server-side because I need the output to be recognized in the final HTML so that...
2
by: Evan | last post by:
Hey, I posted this yesterday, but no one had any ideas? C'mon now, I know this isn't that hard, i'm just a little new to javascript, and I can't quite figure this out. I searched and searched to...
2
adelemb
by: adelemb | last post by:
Hi, I have a bit of JavaScript for a Tell a Friend link. The person enters an email into a box clicks submit and their email programme opens a new mail with the URL from the referring page. My...
1
by: neovantage | last post by:
Hey all, I am using a PHP script which creates headings at run time in a sense at page execution. I am stuck a with a very little problem which i am sure i will have the solution from experts. ...
0
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...
0
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...
1
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...
0
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.