monkfish687
10-25-2006, 12:04 PM
I have two scripts, one is external, I think I need to unify the two but am not sure how to????
I've played with the body tag but can only get one script or the other to work and have searched around how to do this but as a bit of a novice am confused by this, I'm sure the answer is quite simple.
The code:
<script type="text/javascript" src="niftycube.js"></script>
<script type="text/javascript">
<!--
onload=function(){
startsFunctionOne();
startsFunctionTwo()
}
window.onload=function(){
Nifty("div#container");
Nifty("div#content,div#nav","same-height small");
Nifty("div#header,div#footer","small");
}
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
uk1homestay_03_over = newImage("images/uk1homestay_03-over.gif");
uk1homestay_06_over = newImage("images/uk1homestay_06-over.gif");
preloadFlag = true;
}
}
//-->
</script>
</head>
<body>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="preloadImages();">
I've played with the body tag but can only get one script or the other to work and have searched around how to do this but as a bit of a novice am confused by this, I'm sure the answer is quite simple.
The code:
<script type="text/javascript" src="niftycube.js"></script>
<script type="text/javascript">
<!--
onload=function(){
startsFunctionOne();
startsFunctionTwo()
}
window.onload=function(){
Nifty("div#container");
Nifty("div#content,div#nav","same-height small");
Nifty("div#header,div#footer","small");
}
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
uk1homestay_03_over = newImage("images/uk1homestay_03-over.gif");
uk1homestay_06_over = newImage("images/uk1homestay_06-over.gif");
preloadFlag = true;
}
}
//-->
</script>
</head>
<body>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="preloadImages();">