Javascript code inside a table cell....

  • Thread starter Thread starter Pete Smith
  • Start date Start date
P

Pete Smith

I am making the animated text inside the table cell data. The animation is
done using Javascript.

Here is the code looks like..

<table><tr><td><script>Java Script code which does animation of
text</script></td></tr></table>

Animation code written in Java script runs to several lines. This animation
text code is called in several pages. How to make it generic so that I can
call with one short statement. Like a function call?

CSS is helpful here? .NetFramework 1.1.

Thank you,

-Pete
 
Pete,

Why don't you make a javascript function, put it in a separate file, connect
the file to all pages that will use it and call the function according to
the application logic?

function foo(){
// code come here
}

<script src="fileWithFoo.js"></script>


Eliyahu
 
Back
Top