...

View Full Version : Calling a JS function from another webpage



AngelicKnight
03-16-2004, 12:12 AM
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.

A1ien51
03-16-2004, 01:18 AM
You are not going to be able to call a script if it is on another domain....

whammy
03-16-2004, 03:16 AM
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...

AngelicKnight
03-16-2004, 04:02 AM
Thanks, that was a big help guys.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum