Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 04-30-2009, 01:12 PM   #1
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
Old 04-30-2009, 01:37 PM   #2
AdultSoftwareSolutions
Confirmed User
 
AdultSoftwareSolutions's Avatar
 
Join Date: Mar 2009
Posts: 193
Quote:
I would rather the JS be in the head of the HTML file so that pages moved to sub-directories with ease.
huh? What does this mean? If you want it in the head, put it in the head. Just make sure it doesn't do anything that requires the page to be loaded first though.
__________________
Adult Software Solutions (ICQ 559884738)
PHP, MySQL, Flash, Actionscript, Java, Wowza, CMS, Tube, VOD, CRM, Dating, Social Networks, Paysites, TGPs, Directories and more.
If you can think it I can build it.
AdultSoftwareSolutions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-30-2009, 03:01 PM   #3
sexuallyhealed
So Fucking Banned
 
Join Date: Sep 2005
Posts: 532
no clue..
sexuallyhealed is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-30-2009, 03:16 PM   #4
cyco_cc
Confirmed User
 
cyco_cc's Avatar
 
Join Date: Oct 2008
Posts: 344
If you want the javascript to be inline (not including an external file), it would look like this:

Code:
<script language="javascript" type="text/javascript">
// Your code
</script>
However, you should just include it in your header. It's the exact same thing as putting it inline.
cyco_cc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-30-2009, 03:17 PM   #5
JimmyStephans
Confirmed User
 
JimmyStephans's Avatar
 
Industry Role:
Join Date: Mar 2003
Location: Littleton, Colorado. USA
Posts: 558
Thanks, I get it now.
__________________
http://TrueBabes.com/
JimmyStephans is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.