mark4man
09-14-2003, 04:03 PM
Crew,
What's the best method for combining multiple scripts in the code.
On a page that had two scripts, I was at a loss as to what to do, so I split them up with the Comments in & out arrows, like so:
-----------------------------------------------------------------------------------------------------------------
<script language="JavaScript" type="text/JavaScript">
<!--
if (screen.width <= 1023) {
document.location = "main800.htm";
}
//--!>
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;BlahBlahBlah;
//-->
</script>
-----------------------------------------------------------------------------------------------------------------
& it seems to work fine.
But is this the common practice?
Please inform.
Thanks,
mark4man
What's the best method for combining multiple scripts in the code.
On a page that had two scripts, I was at a loss as to what to do, so I split them up with the Comments in & out arrows, like so:
-----------------------------------------------------------------------------------------------------------------
<script language="JavaScript" type="text/JavaScript">
<!--
if (screen.width <= 1023) {
document.location = "main800.htm";
}
//--!>
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;BlahBlahBlah;
//-->
</script>
-----------------------------------------------------------------------------------------------------------------
& it seems to work fine.
But is this the common practice?
Please inform.
Thanks,
mark4man