Forum Moderators: open
[code]<div id="imageblock"><script type="text/javascript">new fadeshow(slideshow, 344, 228, 0, 4000, 1)</script></div> [code]
Can anyone tell me how to place the lengthy code currently in head into an external file instead? I tried making a file "slideshow.js" and using the following to call it in:
[code]<div id="imageblock"><script type="text/javascript" src="slideshow.js">new fadeshow(slideshow, 344, 228, 0, 4000, 1)</script></div>[code]
but with no luck . . .
Can anyone help?
<div id="imageblock">
<script type="text/javascript" src="slideshow.js"></script>
<script type="text/javascript">
new fadeshow(slideshow, 344, 228, 0, 4000, 1);
</script>
</div>
A script block can either be an exteral file reference or inline code, but both won't work. So in your example you need two script blocks as above...
HTH