Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts

    can i use document.write & onmouseover="status=''" together?

    hey. quick question

    i use this to display e-mail addresses on my page so harvesters cant ravage me in my sleep:

    Code:
    		<script language="JavaScript">
    <!--
    var name = "info";
    var domain = "enviromark.ca";
    document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
    document.write(name + '@' + domain + '</a>');
    // -->
    </script>
    i want to modify this to display in the status bar: "Click here to send an e-mail to info@enviromarrrrrrrk.ca (minus six r's (unless you're a pirate ))

    can i somehow modify the script to do the following?

    Code:
    		<script language="JavaScript">
    <!--
    var name = "info";
    var domain = "enviromark.ca";
    document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
    document.write(name + '@' + domain + '</a>');
    onMouseOver="status='Click here to send an e-mail to document.write(name + '@' + domain)' ; return true" 
    onMouseOut="status=''"
    // -->
    </script>
    that code doesnt work for me... how can i get it to do that?

    i also tried this:
    Code:
    		<script language="JavaScript">
    <!--
    var name = "info";
    var domain = "enviromark.ca";
    document.write('<a href=\"mailto:' + name + '@' + domain + '\" onMouseOver="status='Click here to send an e-mail to document.write(name + '@' + domain)' ; return true" onMouseOut="status=''">');
    document.write(name + '@' + domain + '</a>');
    // -->
    </script>
    but to no avail
    Last edited by canadianjameson; 11-03-2004 at 02:27 AM.
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    you should:

    use window.status
    use return true to get rid of the default window status
    PHP Code:
    <script language="JavaScript" type="text/JavaScript">
    <!--
    var 
    name "info";
    var 
    domain "enviromark.ca";
    document.write('<a href="mailto:' name '@' domain '" onmouseover="window.status=\'Click here to send an e-mail to 'name '@' domain+'\';return true" onmouseout="window.status=\'\'">');
    document.write(name '@' domain '</a>');
    // -->
    </script> 
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    thanks kor, works like a charm
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •