Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-12-2005, 08:07 PM   PM User | #1
solarwind2424
New to the CF scene

 
Join Date: Mar 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
solarwind2424 is an unknown quantity at this point
help me please! how to target frames with button links

i know how to use button links...
this is how...

Code:
<html>

<HEAD>

<script type="javascript">

function goToURL() 
{ 
window.location = "http://www.codingforums.com"; 
}

</script>

</HEAD>


<BODY>

<form>
<input type=button value="CODING FORUMS" onClick="goToURL()">
</form>

</body>

</html>
...BUT, how do you use a button link to link to a specific frame in a webpage


this is my frameset and index file:

index.html
frametop.html
frameleft.html
mainframe.html

index is the file which holds the frames in a frameset
there are 3 frames in index.html
one at the top,
one at the bottom, which is split into two frames.

so how do i use a button link to ... lets say... link to www.codingforums.com, but so that the target is "mainframe.html"?

--any help is appreciated, thankyou!
solarwind2424 is offline   Reply With Quote
Old 03-12-2005, 08:48 PM   PM User | #2
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
<form>
<input type=button value="CODING FORUMS" onclick="parent.mainframe.location='www.codingforums.com'">
</form>
__________________
The silent one.

The most dangerous thing in the world is an idea.
The most dangerous person in the world is the one with an idea.
Mr J is offline   Reply With Quote
Old 03-22-2005, 08:05 PM   PM User | #3
NeilF
New to the CF scene

 
Join Date: Mar 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
NeilF is an unknown quantity at this point
Why are you doing all of the coding with javascript when it can be done in html by just using something like this on one line?

<a href="http://www.codingforums.com" target="mainframe"><img border="0px" src="/images/home.png"></a>

Take a look at www.novell-linux.com

Is this what you are trying to do?

Neil
NeilF is offline   Reply With Quote
Old 03-22-2005, 09:07 PM   PM User | #4
Mr J
Senior Coder

 
Join Date: Aug 2002
Location: UK
Posts: 2,789
Thanks: 2
Thanked 14 Times in 14 Posts
Mr J is on a distinguished road
I think the key word here is button
__________________
The silent one.

The most dangerous thing in the world is an idea.
The most dangerous person in the world is the one with an idea.
Mr J is offline   Reply With Quote
Old 05-16-2012, 03:00 AM   PM User | #5
NinaChou
New to the CF scene

 
Join Date: May 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
NinaChou is an unknown quantity at this point
<frame src="mainframe.html" name="main">

<button onClick="main.location='http://www.codingforums.com'">codingforums</button>
or
<button onClick="parent.main.location='http://www.codingforums.com'">codingforums</button>
NinaChou is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:39 AM.


Advertisement
Log in to turn off these ads.