Using external js fil

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KS

    Using external js fil

    I have a folder where i got all my external javascript.js files saved.
    Using the external.js files in my .jsp files works fin by:

    <script language="JavaS cript" src="/PlexSysWeb/javascript/disableObjekt.j s">

    </script><script language="JavaS cript"
    src="/PlexSysWeb/javascript/respons.js"></script>



    I want to use/call a method in external disableObjekt.j s inside a metode in
    respons.js.

    How do I do this. I could copy and paste the code, but im going to this a
    lot, so if i change the code i have copy and paste

    it would be alot of work.



    Thanx in advance







  • Martin Honnen

    #2
    Re: Using external js fil



    KS wrote:
    [color=blue]
    > I have a folder where i got all my external javascript.js files saved.
    > Using the external.js files in my .jsp files works fin by:
    >
    > <script language="JavaS cript" src="/PlexSysWeb/javascript/disableObjekt.j s">
    >
    > </script><script language="JavaS cript"
    > src="/PlexSysWeb/javascript/respons.js"></script>
    >
    >
    >
    > I want to use/call a method in external disableObjekt.j s inside a metode in
    > respons.js.
    >
    > How do I do this. I could copy and paste the code, but im going to this a
    > lot, so if i change the code i have copy and paste
    >
    > it would be alot of work.[/color]

    Simply call the function, any script loaded after disableObjekt.j s can
    do that.

    --

    Martin Honnen


    Comment

    • Greg

      #3
      Re: Using external js fil

      Martin Honnen <Martin.Honnen@ t-online.de> wrote in message news:<3f65a17a$ 1@olaf.komtel.n et>...[color=blue]
      > KS wrote:
      >[color=green]
      > > I have a folder where i got all my external javascript.js files saved.
      > > Using the external.js files in my .jsp files works fin by:
      > >
      > > <script language="JavaS cript" src="/PlexSysWeb/javascript/disableObjekt.j s">
      > >
      > > </script><script language="JavaS cript"
      > > src="/PlexSysWeb/javascript/respons.js"></script>
      > >
      > >
      > >
      > > I want to use/call a method in external disableObjekt.j s inside a metode in
      > > respons.js.
      > >
      > > How do I do this. I could copy and paste the code, but im going to this a
      > > lot, so if i change the code i have copy and paste
      > >
      > > it would be alot of work.[/color]
      >
      > Simply call the function, any script loaded after disableObjekt.j s can
      > do that.[/color]


      I don't claim to understand the lifetime and visiblity of functions in
      JS, but in my tests, what seems to matter is when a function is
      called. For one function to call another, both must be loaded, but the
      order does not seem to matter.

      Is this wrong?

      This surprised me. Am I mistaken?

      Comment

      Working...