External JS Call Problem??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #16
    Originally posted by Markus
    Or calling it from <body onload="myfunct ion()">?
    I (personally) don't consider that as an option.

    although the original problem is (I think) rather, whether the external file is loaded or not. otherwise I can't imagine what cause should be there for the error message.

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #17
      Originally posted by Markus
      Wouldn't

      Code:
      window.onload = function ()
      {
          myfunction();
      }
      overcome that problem too?

      Or calling it from <body onload="myfunct ion()">?
      See "onLoad" event fired when page loaded completely. Now before getting loaded fully page needs to do something which will be by JavaScript that's where the context comes in ;)
      What i saw in GMail ... basically the Mail ID box gets focus first then at "onLoad" the Password box gets focus.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #18
        Originally posted by dmjpro
        See "onLoad" event fired when page loaded completely. Now before getting loaded fully page needs to do something which will be by JavaScript that's where the context comes in ;)
        What i saw in GMail ... basically the Mail ID box gets focus first then at "onLoad" the Password box gets focus.
        Sorry, what?

        Comment

        • Dormilich
          Recognized Expert Expert
          • Aug 2008
          • 8694

          #19
          Originally posted by dmjpro
          What i saw in GMail ... basically the Mail ID box gets focus first then at "onLoad" the Password box gets focus.
          what advantage should that have? the password box is the first item to be used, I don't see a benefit for marking the ID box first (besides that you can mimic that with a little timeout).

          Comment

          • dmjpro
            Top Contributor
            • Jan 2007
            • 2476

            #20
            Originally posted by Markus
            Sorry, what?
            What you posted .. "ziycon" needs to execute some JS code before the page getting loaded fully but you suggested to execute this after the page loaded fully ;)

            Comment

            • dmjpro
              Top Contributor
              • Jan 2007
              • 2476

              #21
              Originally posted by Dormilich
              what advantage should that have? the password box is the first item to be used, I don't see a benefit for marking the ID box first (besides that you can mimic that with a little timeout).
              Actually what i meant here .... before page loading fully Mail ID box gets focus and after page loaded fully the Password box gets focus. That's what i said .. Actually i am not against this policy, it should be .. Actually What "Markus" said, with respect to that post i gave an example.
              May be some confusion created over here ;) sorry!

              Comment

              Working...