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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2003
    Location
    Lancashire UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need help with a Java code!!

    Can anyone tell me what this means and were to insert it into the other bit of Java?
    <script>

    /*
    Highlight Link script
    By JavaScript Kit (http://javascriptkit.com)
    Over 400+ free scripts here!
    Above notice MUST stay entact for use
    */

    function highlight(which,color){
    if (document.all||document.getElementById)
    which.style.backgroundColor=color
    }
    </script>

    <p align="center"><font face="arial" size="-2">This free script provided by</font><br><font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

    This is what i need to add to it but i dunno were it goes. If anyone could do it for me so i can see how it goes, thanks


    Now, to apply the highlight effect to any link, simply add the below into the <a> tag in question:

    <a href="http://javascriptkit.com/" onMouseover=highlight(this,'yellow') onMouseout="highlight(this,document.bgColor)">JavaScript Kit Free JavaScripts</a>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    1) its javascript not java there is a difference.

    2) to answer your question place the first part between the <body> and </body> tags. I would ten to put it after the <body> tag

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #3
    New to the CF scene
    Join Date
    Apr 2003
    Location
    Lancashire UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by scroots
    1) its javascript not java there is a difference.

    2) to answer your question place the first part between the <body> and </body> tags. I would ten to put it after the <body> tag

    scroots
    Body tags on my site? I use Geocities and it it's HTML. I can insert the ode but how do i add this
    <a href="http://javascriptkit.com/" onMouseover=highlight(this,'yellow') onMouseout="highlight(this,document.bgColor)">JavaScript Kit Free JavaScripts</a>



    To this
    /*
    Highlight Link script
    By JavaScript Kit (http://javascriptkit.com)
    Over 400+ free scripts here!
    Above notice MUST stay entact for use
    */

    function highlight(which,color){
    if (document.all||document.getElementById)
    which.style.backgroundColor=color
    }
    </script>

    <p align="center"><font face="arial" size="-2">This free script provided by</font><br><font face="arial, helvetica" size="-2"><a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

    This is what i need to add to it but i dunno were it goes. If anyone could do it for me so i can see how it goes, thanks


    Now, to apply the highlight effect to any link, simply add the below into the <a> tag in question:

    <a href="http://javascriptkit.com/" onMouseover=highlight(this,'yellow') onMouseout="highlight(this,document.bgColor)">JavaScript Kit Free JavaScripts</a>

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    1,137
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes they are between html tags

    <html>

    <head>

    <title>New Page 1</title>
    </head>

    <body>

    </body>

    </html>

    did you spot the body tags? your script should go between them. your site content also goes between them

    scroots
    Spammers next time you spam me consider the implications:
    (1) that you will be persuaded by me(in a legitimate mannor)
    (2)It is worthless to you, when i have finished

  • #5
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <html>
    <head>
    <title>title</title>
    <script type="text/javascript">
    /*
    Highlight Link script
    By JavaScript Kit (http://javascriptkit.com)
    Over 400+ free scripts here!
    Above notice MUST stay entact for use
    */
    function highlight(which,color){
    if (document.all||document.getElementById)
    which.style.backgroundColor=color
    }
    </script>
    </head>
    <body>
    <a href="http://javascriptkit.com/" onMouseover=highlight(this,'yellow') onMouseout="highlight(this,document.bgColor)">JavaScript Kit Free JavaScripts</a>
    </body>
    </html>



  •  

    Posting Permissions

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