/    Sign up×
Community /Pin to ProfileBookmark

where to put code?

i have created a frameset site, now finding some problems with getting two of the frames to change at once when clicking from the the main frame.

The frameset consists of a main frame, left frame, and top frame.

i’ve followed a tutorial to create the following javascript code below

<a href=”sidemenuteam1.htm”
onClick=”window.self.location=’team.htm'” target=”otherframe”>
Zombies</a>

This code is supposed to go in the main frame but where?

its supposed to make the main frame change to ‘team.htm’ and the left frame change to “sidemenuteam1.htm”, do i need to change “otherframe” in the code to left frame?,

i’ve tried putting the code in but it just ends up being displayed on the page itself!

please help!

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@LotusJul 22.2003 — I'm not sure, but try putting it where you want it and then put <html> tags around it. Show me you code if that doesn't work and I'll see...
Copy linkTweet thisAlerts:
@neil-btccauthorJul 22.2003 — thanks for your help i've sorted it out now, i'm new to this coding lark, what i did was simply look at where my old links were in the code and replaced that with the new code. quiet straight forward really

the full code is

Click <ahref="team.htm"></a><ahref="sidemenuteam1.htm"

onClick="window.self.location='team.htm'" target="leftFrame"><font color="6f98fd">here</font></a>&nbsp;to go to the <br> Meet the Team section </font></div>

you can see how the code for making the link work goes in between the sentence where the link is

e.g click (code) to go to the Meet the Team section

after "target="leftFrame"" in the code you can see the code for what color and for what the link itself will say, in this example "here"

the code works perfectly with one click on the link in the main frame, it changes the main frame and left frame.
Copy linkTweet thisAlerts:
@SlankenOgenJul 22.2003 — Better to do it like this

<a href="sidemenuteam1.htm" target="otherframe"

onClick="window.self.location='team.htm'">

Zombies</a>
Copy linkTweet thisAlerts:
@neil-btccauthorJul 22.2003 — yeah sorry the <ahref="team.htm"> was left over in the code from the old link and i accidently cut and pasted it so the correct example is as above

thanks everybody
×

Success!

Help @neil-btcc 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 6.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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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