Access Javascript method from another page

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

    #1

    Access Javascript method from another page

    Hello,
    Is there a way to access a javascript method on a different page by
    either writting a method to do it or using links???

    Thanks,
    Pam
  • Mick White

    #2
    Re: Access Javascript method from another page

    Pam wrote:
    [color=blue]
    > Hello,
    > Is there a way to access a javascript method on a different page ...?
    >[/color]

    Yes, if you created the "different" page, and both pages are open.
    Mick

    Comment

    • kaeli

      #3
      Re: Access Javascript method from another page

      In article <616c8f35.05041 81051.2b14e0c9@ posting.google. com>,
      pmelanso@uwater loo.ca enlightened us with...[color=blue]
      > Hello,
      > Is there a way to access a javascript method on a different page by
      > either writting a method to do it or using links???
      >[/color]

      Only if the other page was set to do so.
      I believe they have to be in the same domain, too, but I could be wrong on
      that one.

      --
      --
      ~kaeli~
      I do whatever my Rice Krispies tell me to.



      Comment

      • Fred Oz

        #4
        Re: Access Javascript method from another page

        Pam wrote:[color=blue]
        > Hello,
        > Is there a way to access a javascript method on a different page by
        > either writting a method to do it or using links???
        >
        > Thanks,
        > Pam[/color]

        Is there anything that this can do that putting the script into an
        external file and linking it into both pages won't do?

        --
        Fred

        Comment

        • pmelanso@uwaterloo.ca

          #5
          Re: Access Javascript method from another page


          Fred Oz wrote:[color=blue]
          > Pam wrote:[color=green]
          > > Hello,
          > > Is there a way to access a javascript method on a different page by
          > > either writting a method to do it or using links???
          > >
          > > Thanks,
          > > Pam[/color]
          >
          > Is there anything that this can do that putting the script into an
          > external file and linking it into both pages won't do?
          >
          > --
          > Fred[/color]

          I can't have both pages open but they are in the same domain. External
          file could be a possibility but what type of methods would I use?

          Comment

          • pmelanso@uwaterloo.ca

            #6
            Re: Access Javascript method from another page


            Fred Oz wrote:[color=blue]
            > Pam wrote:[color=green]
            > > Hello,
            > > Is there a way to access a javascript method on a different page by
            > > either writting a method to do it or using links???
            > >
            > > Thanks,
            > > Pam[/color]
            >
            > Is there anything that this can do that putting the script into an
            > external file and linking it into both pages won't do?
            >
            > --
            > Fred[/color]

            I can't have both pages open but they are in the same domain. External
            file could be a possibility but what type of methods would I use?

            Comment

            • Mr.Clean

              #7
              Re: Access Javascript method from another page

              In article <1113918990.567 417.241170@g14g 2000cwa.googleg roups.com>, pmelanso@uwater loo.ca says...[color=blue]
              >
              > Fred Oz wrote:[color=green]
              > > Pam wrote:[color=darkred]
              > > > Hello,
              > > > Is there a way to access a javascript method on a different page by
              > > > either writting a method to do it or using links???
              > > >
              > > > Thanks,
              > > > Pam[/color]
              > >
              > > Is there anything that this can do that putting the script into an
              > > external file and linking it into both pages won't do?
              > >
              > > --
              > > Fred[/color]
              >
              > I can't have both pages open but they are in the same domain. External
              > file could be a possibility but what type of methods would I use?
              >
              >[/color]


              Place the routine in an external file and just add a link to it:

              <script src="external.j s"></script>

              Then you can call the routines from any page that has the link.

              Comment

              Working...