Click to See Complete Forum and Search --> : where to put code?


neil-btcc
07-22-2003, 04:14 AM
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!

Lotus
07-22-2003, 04:57 AM
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...

neil-btcc
07-22-2003, 05:20 AM
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.

SlankenOgen
07-22-2003, 07:08 AM
Better to do it like this

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

neil-btcc
07-22-2003, 07:22 AM
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