/    Sign up×
Community /Pin to ProfileBookmark

How to use innerHTML on an element of a different frame??

Following are my frames:

<frameset cols=”600,*“>
<frame name=”a” src=”a.html”>
<frameset rows=”300,*
“>
<frame name=”b” src=”b.html”>
<frame name=”c” src=”c.html”>
</frameset>
</frameset>

The content of c.html:
<p> Price <span id=”price”>0</span> </p>

The content of b.html:
<button type=”button” onclick=”myfunc()”></button>

Now, in the javascript myfunc() function, I want to use innerHTML on <span> element of file c.html. How can I access the id of the span element?

Thanks a lot for any help.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@rtretheweyApr 19.2013 — Do yourself a favor and redesign this page without using <frame>s before you put any more time into this project. There are alternatives that provide the same functionality without the limitations of <frame>s. Good luck!
Copy linkTweet thisAlerts:
@echipbkauthorApr 20.2013 — What is that alternative? Thank you.
×

Success!

Help @echipbk 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.18,
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,
)...