...

View Full Version : help me please! how to target frames with button links



solarwind2424
03-12-2005, 08:07 PM
i know how to use button links...
this is how...




<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!

Mr J
03-12-2005, 08:48 PM
<form>
<input type=button value="CODING FORUMS" onclick="parent.mainframe.location='www.codingforums.com'">
</form>

NeilF
03-22-2005, 08:05 PM
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

Mr J
03-22-2005, 09:07 PM
I think the key word here is button

NinaChou
05-16-2012, 03:00 AM
<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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum