/    Sign up×
Community /Pin to ProfileBookmark

external javascripts talking to each other

I have a frameset that references two external javascripts as such:

<script language=”JavaScript” type=”text/javascript” src=”PageList.js”></script>

<script language=”JavaScript” type=”text/javascript” src=”cbtscript.js”></script>

All of the frames can access the variables and functions of either .js file. I am having trouble with a function in the cbtscript.js accessing the PageList.js.

Any ideas? I want to keep the two separate so that all the user maintenance can be located in one place instead of amoung all the other javascript code.

Kodie

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@BillyRayAug 23.2004 — Assuming that both files have loaded before you try to access things in one from the other, then there should be no problem (also assuming that the error doesn't involve cross-domain scripting issues).

Can you elaborate more on what the problem code is?

Dan
Copy linkTweet thisAlerts:
@WestPacAug 23.2004 — Try reversing the order that you included them.

<script language="JavaScript" type="text/javascript" src="cbtscript.js"></script>

<script language="JavaScript" type="text/javascript" src="PageList.js"></script>
×

Success!

Help @killiank spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...