/    Sign up×
Community /Pin to ProfileBookmark

Mozilla FireFox – Javascript Has no properties Error

Hello all,

Please can one of you brilliant people help me out here.

I have this javascipt code

<SCRIPT language=”JavaScript”>
function change2() {
parent.top_frame.location=”sanlameer/sound_sanlameer.asp”;
parent.bottom_frame.location=”sanlameer/default.asp”;
}
</SCRIPT>

It does not work with FireFox

Gives an error

parent.top_frame has no properties

PLEASE HELP!!! ?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangOct 13.2005 — What is your [I]frameset[/I] and from where are you calling the function?
Copy linkTweet thisAlerts:
@champiauthorOct 14.2005 — Here is my frameset

frameset rows="15,*" frameborder="no" border="0" framespacing="0">

<frame src="sound.asp" name="mainFrame" id="top_frame" />

<frame src="main.asp" name="bottomFrame" scrolling="Yes" noresize="noresize" id="bottom_frame" />

</frameset><noframes></noframes>

And I am calling the function from the main.asp page
Copy linkTweet thisAlerts:
@augustOct 14.2005 — Probably because the frame you refer to as "top_frame" has that value assigned to its "ID" attribute, but when you refer to "ID"s from JavaScript you should probably use the document.getElementById("top_frame") method, since the parent.elementName format usually refers to the "name" attribute of html elements. So you're refering to the [I]name[/I] "top_frame" which doesn't exist.

If that holds true you should try: [CODE]parent.[COLOR=Indigo]mainFrame[/COLOR].location="sanlameer/sound_sanlameer.asp"[/CODE]

Or just swap the ID and Name values.
Copy linkTweet thisAlerts:
@champiauthorOct 21.2005 — Wow thanks!!!
×

Success!

Help @champi 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.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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