Javascript code inside a table cell....

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
 
E

Eliyahu Goldin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top