...

View Full Version : I need help with a Java code!!



AvrilsSk8erBoi
04-06-2003, 03:42 PM
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>

scroots
04-06-2003, 03:46 PM
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

AvrilsSk8erBoi
04-06-2003, 03:51 PM
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>

scroots
04-06-2003, 06:54 PM
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

cg9com
04-07-2003, 01:11 AM
<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>

:D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum