Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2004
    Location
    Arkansas
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Calling a JS function from another webpage

    How do I write script on one page so that it calls a function that exists on an entirely different page? For example, I am currently building a webring, so I need to figure out how I can place buttons on a webring member's webpage so that it will call javascript functions from the page on which the webring itself exits on.
    The James Website:
    www.angelfire.com/realm/angelicknight

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    You are not going to be able to call a script if it is on another domain....
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can if all of the webring sites access the same javascript code... i.e.:

    <script type="text/javascript" src="http://blah.blah.com/whatever.js"></script>

    However, your site will take a bandwidth hit from the other sites accessing the file... and obviously, it won't "interact" with the other sites, so if you want to do anything dynamic with your webring, you'd need to look to a server-side language or a web service...
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    New to the CF scene
    Join Date
    Feb 2004
    Location
    Arkansas
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, that was a big help guys.
    The James Website:
    www.angelfire.com/realm/angelicknight


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •