how can show more then one onload scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • idsanjeev
    New Member
    • Oct 2007
    • 241

    how can show more then one onload scripts

    hi frainds
    i wants to use more then one onload scrits but only one is working at time
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Originally posted by idsanjeev
    hi frainds
    i wants to use more then one onload scrits but only one is working at time
    Show me how you are doing that.

    Comment

    • idsanjeev
      New Member
      • Oct 2007
      • 241

      #3
      Hi hsriat
      just copy two code from code help and paste it
      file attached

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        just write a function that calls both of the scripts (and use ONE onload :) ):

        [CODE=javascript]var init = function() {
        fade();
        Go();
        };

        window.onload = init;
        [/CODE]
        kind regards

        Comment

        • idsanjeev
          New Member
          • Oct 2007
          • 241

          #5
          Hi gits
          thanks
          but little confussion where can use this code
          i should write both code in one java scripts tag or i can write it individual tag

          Comment

          • gits
            Recognized Expert Moderator Expert
            • May 2007
            • 5390

            #6
            that doesn't matter ... but it is good practice to just use ONE script-area in a page and best practice to use external sources ...

            kind regards

            Comment

            • idsanjeev
              New Member
              • Oct 2007
              • 241

              #7
              Hi gits
              I am using it but not working please revise it.
              what do you mean by external sources

              Comment

              • hsriat
                Recognized Expert Top Contributor
                • Jan 2008
                • 1653

                #8
                Originally posted by idsanjeev
                Hi gits
                what do you mean by external sources
                Script written in a separate .js file and called in the page, like
                [code=javascript]<script type="text/javascript" src="js111.js"> </script>[/code]is an external source.

                Comment

                • idsanjeev
                  New Member
                  • Oct 2007
                  • 241

                  #9
                  Hi hsriat
                  thanks i Know that but i don't know thats is called external source
                  thnanks again

                  Comment

                  • idsanjeev
                    New Member
                    • Oct 2007
                    • 241

                    #10
                    Hi friends
                    I am using both
                    external and saperate tag but not working one is attached here please revise it
                    thanks

                    Comment

                    Working...