PDA

View Full Version : Resolved Image Thumbnail Viewer II - How to embed into html page itself?



tehbutch
04-23-2009, 09:09 PM
1) Script Title: Image Thumbnail Viewer II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm

3) Describe problem:

Alright, tbh I don't know a whole lot about javascript itself, but from just looking at code I can usually figure stuff out. I'm making a page where I won't be able to link to an external js file. I know it's not as simple as copy pasting the contents of the js file into the <script> tag of the html code, what do I need to do for this to work? or can this not work at all?

Snookerman
04-23-2009, 09:12 PM
It is actually just that simple (well almost). Just remove the source reference (highlighted) and add all the code from the external file into the tags:

<script type="text/javascript" src="thumbnailviewer2.js" defer="defer">

/***********************************************
* Image Thumbnail Viewer II script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

Script code goes here

</script>
Make sure you keep the credit notice there at the top.

Good luck!