View Single Post
Old 04-30-2009, 01:12 PM  
JimmyStephans
Confirmed User
 
JimmyStephans's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: Littleton, Colorado. USA
Posts: 558
Javascript Questions

I just had some new pages done for TrueBabes that includes some JS

The designer includes the script like this

<script type="text/javascript" src="images/scripts/tb.js"></script>

I would rather the JS be in the head of the HTML file so that pages moved to sub-directories with ease.

How would I do that?

The code is:

?// JScript File
function onmenubuttonover(cb,nm)
{
if(cb==null){return;}
cb.src="images/common/" + nm+"_hl.jpg";
}

function onmenubuttonout(cb,nm)
{
if(cb==null){return;}
cb.src="images/common/" + nm+".jpg";
}

function onclientbuttonover(cb,num,nm)
{
if(cb==null){return;}
cb.src="images/" + num + "/" + nm+"_hl.jpg";
}

function onclientbuttonout(cb,num,nm)
{
if(cb==null){return;}
cb.src="images/" + num + "/" + nm+".jpg";
}

So, basically how do I place that is the head of the HTML?

Thanks in advance
__________________
http://TrueBabes.com/
JimmyStephans is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook