Javascript code inside a table cell....

Discussion in 'ASP .Net' started by Pete Smith, Mar 14, 2006.

  1. Pete Smith

    Pete Smith Guest

    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 Smith, Mar 14, 2006
    #1
    1. Advertising

  2. 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

    "Pete Smith" <> wrote in message
    news:uZ8Ww%...
    >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
    >
    >
     
    Eliyahu Goldin, Mar 15, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. f
    Replies:
    5
    Views:
    101,047
    thebeacon
    Jul 16, 2006
  2. Phillip Roncoroni
    Replies:
    14
    Views:
    1,137
    Toby A Inkster
    Apr 5, 2004
  3. jc
    Replies:
    10
    Views:
    3,758
    Kevin Scholl
    Jun 30, 2009
  4. Dom Nicholas
    Replies:
    0
    Views:
    206
    Dom Nicholas
    Oct 8, 2003
  5. Dacian
    Replies:
    2
    Views:
    154
Loading...

Share This Page