This question is in continuation to my existing thread.
Below given is a code section. There is a JavaScript code embedded inside a Table column tag. I want to get rid of the script tag. What can be the other way of calling that JavaScript function that resides in a separate .js file?
<tr>
<td width="599" height="154" valign="top">
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 593, 163, 0, 3000, 1, "R")
//new fadeshow(fadeimages2, 163, 225, 0, 3000, 0)/
</script>
</td>
</tr>
Write a JavaScript function which can find all
tdelements on the page. Now, you need an event which says “call fadeshow now”. That is usually the onClick event. So in your function, for eachtdelement, register a new function which calls fadeshow:thiswill contain thetdelement whenfadeshowis executed.