Target="contents"

Target="contents"

Page 1 of 1

9 Replies - 3261 Views - Last Post: 25 May 2009 - 11:33 PM

#1 ASamBrown  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 05-February 09

Target="contents"

Posted 10 May 2009 - 11:20 AM

It has been a while sense I have done any Frame HTML. I have forgotten how to get all of it to work. Here is what I have:
Frame Set
*******************
<html>
<head>
<title>title2.html</title>
</head>
<frameset rows="50,200,50">
<frame name="title" scrolling="no" noresize target="contents" src="title.html">
<frameset cols="225,*">
<frame name="menu.html" target="contents" src="menu.html">
<frame name="contents" scrolling="yes" noresize target="contents" src="contents.html">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="Status.html">
<noframes>
</noframes>
</frameset>
</html>
********************************************************************************************************************************************************
Menu page
***************
<HTML>
<HEAD>
  <script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//--> </SCRIPT>
  <TITLE>Menu</TITLE>
</HEAD>
<BODY BACKGROUND="BackGround/parchment.gif">
<TABLE>
   <TR>
	  <TD><IMG SRC="Button/home.gif" WIDTH="190" HEIGHT="50" BORDER="0"><A HREF="News.html" Target="content.html"></A><BR>
			  <IMG SRC="Button/Communicate.gif" WIDTH="190" HEIGHT="50" BORDER="0"><A HREF="Communicate.html" _Target="content"></A><BR>
	  </TD>
   </TR>
</TABLE>
</BODY></HTML>
****************************************************************************************************************************************************************
News Page
*****************
<HTML>
<HEAD>
  <script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//--> </SCRIPT>
  <TITLE>News.html</TITLE>
</HEAD>
<BODY BACKGROUND="BackGround/parchment.gif">
<H3> Latest News</H3>
</BODY></HTML>
******************************************************************************************************************************************************************
Communucate Page
************************
<HTML>
<HEAD>
  <script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//--> </SCRIPT>
  <TITLE>Communicate</TITLE>
</HEAD>
<BODY BACKGROUND="BackGround/parchment.gif">
Hello 
</BODY></HTML>



Top, menu, and bottom works. I can not get the third frame space to work. There are several other buttons however if I can get these two to work I can do the rest. I need Frame #3 to change accordingly to the button clicked.

Sammy (Old Man dummy)

Is This A Good Question/Topic? 0
  • +

Replies To: Target="contents"

#2 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: Target="contents"

Posted 10 May 2009 - 01:12 PM

I don't think you should specify the target-attribute in the frames, only in the a-tags which should change the contents of the frames. An a-tag like this:
<a href="url.html" target="content">URL</a>

should change the content of a frame like this:
<frame name="content" scrolling="yes" noresize  src="contents.html">


It has been a long time since I did any work with frames at all so I could be wrong! I would also recommend that you didn't use any frames at all! It's not that very "hipp" anymore, if you allow me to say so!

Hope it works out though! :)

View PostASamBrown, on 10 May, 2009 - 08:20 PM, said:

It has been a while sense I have done any Frame HTML. I have forgotten how to get all of it to work. Here is what I have:
Frame Set
*******************
<html>
<head>
<title>title2.html</title>
</head>
<frameset rows="50,200,50">
<frame name="title" scrolling="no" noresize target="contents" src="title.html">
<frameset cols="225,*">
<frame name="menu.html" target="contents" src="menu.html">
<frame name="contents" scrolling="yes" noresize target="contents" src="contents.html">
</frameset>
<frame name="bottom" scrolling="no" noresize target="contents" src="Status.html">
<noframes>
</noframes>
</frameset>
</html>
********************************************************************************************************************************************************
Menu page
***************
<HTML>
<HEAD>
  <script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//--> </SCRIPT>
  <TITLE>Menu</TITLE>
</HEAD>
<BODY BACKGROUND="BackGround/parchment.gif">
<TABLE>
   <TR>
	  <TD><IMG SRC="Button/home.gif" WIDTH="190" HEIGHT="50" BORDER="0"><A HREF="News.html" Target="content.html"></A><BR>
			  <IMG SRC="Button/Communicate.gif" WIDTH="190" HEIGHT="50" BORDER="0"><A HREF="Communicate.html" _Target="content"></A><BR>
	  </TD>
   </TR>
</TABLE>
</BODY></HTML>
****************************************************************************************************************************************************************
News Page
*****************
<HTML>
<HEAD>
  <script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//--> </SCRIPT>
  <TITLE>News.html</TITLE>
</HEAD>
<BODY BACKGROUND="BackGround/parchment.gif">
<H3> Latest News</H3>
</BODY></HTML>
******************************************************************************************************************************************************************
Communucate Page
************************
<HTML>
<HEAD>
  <script language="javascript">
<!--//
function press()
{if (event.button==2) {
alert('sorry, you cannot do that')}}
document.onmousedown=press
//--> </SCRIPT>
  <TITLE>Communicate</TITLE>
</HEAD>
<BODY BACKGROUND="BackGround/parchment.gif">
Hello 
</BODY></HTML>



Top, menu, and bottom works. I can not get the third frame space to work. There are several other buttons however if I can get these two to work I can do the rest. I need Frame #3 to change accordingly to the button clicked.

Sammy (Old Man dummy)

Was This Post Helpful? 1
  • +
  • -

#3 ASamBrown  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 05-February 09

Re: Target="contents"

Posted 10 May 2009 - 07:45 PM

Made the change in the Frame Set to:
<frame name="content" scrolling="yes" noresize  src="contents.html">



It still will not call the pages. I thank you for the help. got any other suggestions?
Was This Post Helpful? 0
  • +
  • -

#4 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: Target="contents"

Posted 11 May 2009 - 12:03 AM

It should actually work the way I presented it to you, I just checked the W3Schools Frames Tutorial and they do it the exact same way, perhaps you did something wrong? :)

This post has been edited by Wimpy: 11 May 2009 - 12:04 AM

Was This Post Helpful? 0
  • +
  • -

#5 Gorian  Icon User is offline

  • ninja DIC
  • member icon

Reputation: 120
  • View blog
  • Posts: 1,681
  • Joined: 28-June 08

Re: Target="contents"

Posted 16 May 2009 - 12:06 AM

try using javascript. for example:

<input type="button" name="Google" onclick="java script:parent.content.location.href='Content.htm'">



btw, is there some code in place to prevent javascript from being worded together?
edit: corrected spelling

This post has been edited by Gorian: 16 May 2009 - 12:08 AM

Was This Post Helpful? 0
  • +
  • -

#6 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: Target="contents"

Posted 16 May 2009 - 05:12 AM

Isn't that just going to make it even worse? Frames + Javascript navigation, what a blend! :)

View PostGorian, on 16 May, 2009 - 09:06 AM, said:

try using javascript. for example:

<input type="button" name="Google" onclick="java script:parent.content.location.href='Content.htm'">



btw, is there some code in place to prevent javascript from being worded together?
edit: corrected spelling

This post has been edited by Wimpy: 16 May 2009 - 05:12 AM

Was This Post Helpful? 0
  • +
  • -

#7 Gorian  Icon User is offline

  • ninja DIC
  • member icon

Reputation: 120
  • View blog
  • Posts: 1,681
  • Joined: 28-June 08

Re: Target="contents"

Posted 16 May 2009 - 10:25 PM

View PostWimpy, on 16 May, 2009 - 04:12 AM, said:

Isn't that just going to make it even worse? Frames + Javascript navigation, what a blend! :)

View PostGorian, on 16 May, 2009 - 09:06 AM, said:

try using javascript. for example:

<input type="button" name="Google" onclick="java script:parent.content.location.href='http://www.Google.com'">



btw, is there some code in place to prevent javascript from being worded together?
edit: corrected spelling


Hmmm... Maybe... But it worked for me... I successfully wrote a page using 3 frames, where an URL enter manually in one frame change the Location of the second frame.

Edit: href changed to reflect Google as button name suggested

This post has been edited by Gorian: 17 May 2009 - 10:02 PM

Was This Post Helpful? 0
  • +
  • -

#8 Wimpy  Icon User is offline

  • R.I.P. ( Really Intelligent Person, right? )
  • member icon

Reputation: 159
  • View blog
  • Posts: 1,038
  • Joined: 02-May 09

Re: Target="contents"

Posted 17 May 2009 - 04:36 AM

Of course you did, but that's not the issue really, say that a visitor doesn't have javascript activated or somehow doesn't have a browser that use javascript, this visitor wouldn't be able to navigate the site and frames is just bad enough on its own! :)

View PostGorian, on 17 May, 2009 - 07:25 AM, said:

Hmmm... Maybe... But it worked for me... I successfully wrote a page using 3 frames, where an URL enter manually in one frame change the Location of the second frame.

Was This Post Helpful? 0
  • +
  • -

#9 Gorian  Icon User is offline

  • ninja DIC
  • member icon

Reputation: 120
  • View blog
  • Posts: 1,681
  • Joined: 28-June 08

Re: Target="contents"

Posted 17 May 2009 - 01:48 PM

View PostWimpy, on 17 May, 2009 - 03:36 AM, said:

Of course you did, but that's not the issue really, say that a visitor doesn't have javascript activated or somehow doesn't have a browser that use javascript, this visitor wouldn't be able to navigate the site and frames is just bad enough on its own! :)

View PostGorian, on 17 May, 2009 - 07:25 AM, said:

Hmmm... Maybe... But it worked for me... I successfully wrote a page using 3 frames, where an URL enter manually in one frame change the Location of the second frame.


hmmm... frames are bad.... however, you could use a javascript with something like this:

<script language="javascript">
function OpenSite() {
	document.clear();
	document.writeln("<Title>Title</Title>");
	document.writeln("<script language='javascript' src='MainScript.js'>");
	document.writeln("</Script>");
	document.writeln("<Frameset COLS='30%,*' border=0>");
	document.writeln("	<Frame src='Frame1.htm' name='data'>");
	document.writeln("<Frameset ROWS='90%,10%,*'>");
	document.writeln("	<Frame id=mainframe src='Frame2.htm' name='main'>");
	document.writeln("	<Frame src='name.htm'>");
	document.writeln("</Frameset>");
	document.writeln("</Frameset>");
}
</script>

<noscript>.
You do not have javascript enabled. <a href="noscriptindex.htm">Click here</a> to enter the non-javascript site
</noscript>

<input type="button" name="enter site" onclick="OpenSite();">



been a while since I coded any of this, so a little grace on the coding.... :blink:

Edit: grammer?

This post has been edited by Gorian: 17 May 2009 - 10:03 PM

Was This Post Helpful? 0
  • +
  • -

#10 Toxicterror  Icon User is offline

  • blub

Reputation: 15
  • View blog
  • Posts: 687
  • Joined: 10-March 09

Re: Target="contents"

Posted 25 May 2009 - 11:33 PM

Quote

<frame name="menu.html" target="contents" src="menu.html">


did you name this frame menu.html on purpose??
shouldnt it have a propper name like the others too?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1