how to replace text on a page using Javascript code

Discussion in 'Javascript' started by Tony Strazzeri, May 17, 2005.

  1. 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:"
    Note: the "_" are actually spaces.

    Instead of; "Send Email to: "

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

    Cheers
    TonyS.
     
    Tony Strazzeri, May 17, 2005
    #1
    1. Advertising

  2. Thank you. That works a treat!

    Cheers
    TonyS.
     
    Tony Strazzeri, May 19, 2005
    #2
    1. Advertising

  3. Tony Strazzeri wrote:

    > Thank you. That works a treat!


    No, it does not.


    PointedEars
     
    Thomas 'PointedEars' Lahn, May 23, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alun
    Replies:
    3
    Views:
    4,647
    Masudur
    Feb 18, 2008
  2. juglesh
    Replies:
    16
    Views:
    344
    juglesh
    Dec 27, 2004
  3. penny
    Replies:
    28
    Views:
    3,033
    Charlton Wilbur
    Mar 10, 2008
  4. mscir
    Replies:
    0
    Views:
    332
    mscir
    Oct 12, 2005
  5. Replies:
    7
    Views:
    208
    Yanick
    Aug 4, 2006
Loading...

Share This Page