>
>
>So - I decided to simplify - and simply set a variable LoadScroll on the
>pages I needed the scroll to load -
><cfset LoadScroll = "LoadMe">
>With a simple
><cfif LoadScroll EQ "LoadMe">
><script type="text/javascript"
>src="http://64.234.202.15/scrollsYes.js"></script>
><cfelse>
><script type="text/javascript"
>src="http://64.234.202.15/scrollsNo.js"></script>
></cfif>
>
>
If you split up the funstions to different files, like
Just create a function called
function init(){
if (scroll()){}
otheronloadfunction1();
otheronloadfunction2();
}
That way scroll only get's called if it exists (this is allowed because
it's in a if statement).
Now put yout scroll function in a js file like:
scroll.js:
function scroll(){}
and the other onload functions in another js file like:
other.js:
otheronloadfunction1();
otheronloadfunction2();
Now only include the scroll.js into files that need the scroll
functionality, and add onload="init();" to the body tag of every file.
This should do the trick
Jesse
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4