View Full Version : Mike's DHTML scroller situation

03-10-2011, 03:07 PM
I want to move the script to an external js file to tidy up the code and so that I can convert the page to xhtml.

03-10-2011, 11:32 PM
Please post a link to the script you are referring to. And if you need help with your specific page, you will need to post a link to your site as well.

Generally, though, this is very easy.

Take ALL of the content exactly as-is from between the <script......> and </script> tags. Save that as "something.js" and upload that file to your website.
Then replace the original Javascript and script tags with this line:
<script src="something.js" type="text/javascript"></script>

1. The scripts here on Dynamic Drive require the copyright notice is maintained on the page, so please take that portion and leave it between the script tags.
2. Make sure that the value of the SRC attribute is relative to the location of the actual JS file and the location of your page. It works just like an <img src="..."> tag.

Please let us know if you need more help.

03-11-2011, 06:32 PM
http://www.dynamicdrive.com/dynamicindex2/mikescroll.htm. My apology for not posting this script earlier.

03-11-2011, 10:26 PM
Did my reply answer your question?

The general information should apply to that script.

By the way, I'd recommend changing all instances of language="JavaScript" in the script tags to: type="text/javascript". That may help it validate.