Solved

Navigators and Refreshing

Posted on 2000-02-14
24
235 Views
Last Modified: 2010-04-09
Hi,
I want to be able to access a different page on a frame without having to refresh the whole of the page.
For example :- This is my Frame page.

<html>
<head>
<title>IT Home</title>
</head>

<frameset border="0" framespacing="0" frameborder="0" rows="70,*">
  <frame src="a.html" name="top" scrolling="no" marginheight="0" marginwidth="0"
  framespacing="0">
  <frameset cols="240,*">
    <frame src="b.htm" name="nav" scrolling="auto" marginheight="0"
    marginwidth="0" framespacing="0">
    <frameset rows="1210">
      <frame src="c.html" name="body" scrolling="auto" marginheight="0"
      marginwidth="0" framespacing="0">
    </frameset>
  </frameset>
  <noframes>
  <body TEXT="000000" BGCOLOR="ffffff">
  </body>
  </noframes>
</frameset>
</html>

This is part of my nav bar (b)

<HTML>
<head>
<title>Quick News with Clock</title>
</head>
<body text="000000" link="#FFCC00" vlink="#CCCC00" alink="#CCFF00" onLoad="show5()">
<div align="left">
<PARAM NAME="MENU 1-1" VALUE="Network Security">
<PARAM NAME="LINK 1-1-1" VALUE="firewall/firewall.html">
<PARAM NAME="OPTION 1-1-1" VALUE="Firewalls">
<PARAM NAME="LINK 1-1-2" VALUE="holiday/calindex.html">
<PARAM NAME="OPTION 1-1-2" VALUE="Holidays">
<PARAM NAME="LINK 1-1-3" VALUE="">
<PARAM NAME="OPTION 1-1-3" VALUE="Documentation">
</BODY>
</HTML>
What do I need to do so that when I click on the link in the nav bar, it only updates the main frame source called body. I have tried TARGET="_body" and TARGET="_parent" without success.
Cheers,
H.
0
Comment
Question by:pfads
  • 9
  • 7
  • 6
  • +2
24 Comments
 
LVL 8

Expert Comment

by:xabi
Comment Utility
I'm not sure but why don't you try to change the name "body" into "mybody" and 'target="mybody"'?

xabi
0
 

Author Comment

by:pfads
Comment Utility
Xabi,
Thanx for your input, but unfortunately this hasn't worked.
Hannibal.
0
 
LVL 1

Expert Comment

by:cabrionet
Comment Utility
You must write right target. In the frameset you have names:
name="top"
name="nav"
name="body"
So if you want to update frame you must use right name. In this case body (not _body)

This your sorce is not ok. (on IE are errors)

good luck
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
Your code is only showing the parameters of a Java Applet.  You are missing the beginning and ending parts.  Is this all of your page's code?

If you are not using a Java Applet then you can use JavaScript to achieve the same effect.  If you are using an Applet then you first need to add the beginning and ending.

You can also trying using <BASE TARGET="body">
This is to be located between the <head> and </head> tags.

tec
0
 
LVL 3

Expert Comment

by:messentary
Comment Utility
Place this as your Frames source code:

<html>
                      <head>
                      <title>IT Home</title>
                      </head>

                      <frameset border="0" framespacing="0" frameborder="0" rows="70,*">
                        <frame src="a.html" name="top" scrolling="no" marginheight="0" marginwidth="0"
                        framespacing="0">
                        <frameset cols="240,*">
                          <frame src="b.htm" name="nav" scrolling="auto" marginheight="0"
                          marginwidth="0" framespacing="0" target="body">
                          <frameset rows="1210">
                            <frame src="c.html" name="body" scrolling="auto" marginheight="0"
                            marginwidth="0" framespacing="0">
                          </frameset>
                        </frameset>
                        <noframes>
                        <body TEXT="000000" BGCOLOR="ffffff">
                        </body>
                        </noframes>
                      </frameset>
                      </html>

Now use this as your Nav source code:

<HTML>
                      <head>
                      <title>Quick News with Clock</title>
                      </head>
<base target="body">
                      <body text="000000" link="#FFCC00" vlink="#CCCC00" alink="#CCFF00" onLoad="show5()">
                      <div align="left">
                      <PARAM NAME="MENU 1-1" VALUE="Network Security">
                      <PARAM NAME="LINK 1-1-1" VALUE="firewall/firewall.html">
                      <PARAM NAME="OPTION 1-1-1" VALUE="Firewalls">
                      <PARAM NAME="LINK 1-1-2" VALUE="holiday/calindex.html">
                      <PARAM NAME="OPTION 1-1-2" VALUE="Holidays">
                      <PARAM NAME="LINK 1-1-3" VALUE="">
                      <PARAM NAME="OPTION 1-1-3" VALUE="Documentation">
                      </BODY>
                      </HTML>

There is no need to place a _ before body if that is your frames name.  To have the page that will fill the body, place this in the <head> of all the pages:

<meta http-equiv="Pragma" content="no-cache">
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
messentary, what new information did you provide?  From what I can tell, you copied the code posted by pfads and pasted if into your comment and added an additional line of code that I had posted, i.e. <BASE TARGET="body">.

The meta tag for not cacheing a page won't do anything for getting the page to load when the menu item is selected.  The only thing it will do is make the browser download the page from the web site each time, rather than using the cache.

tec
0
 

Author Comment

by:pfads
Comment Utility
tecbuilder,
Thank you for all of your comments.

You are correct in stating that the 'nav' source is only a small portion of the text, and is part of an applet.

Do you wish to see the full text? I'm not convinced that this will help with a solution but I am willing to give this information.

My problem is simply, when I point to a 'link' in my 'nav' bar, I want the new link to show in a specific frame.

Is this possible?
And how do you point the link to specific frames?

Cheers,
H.
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
Did the <BASE TARGET="body"> work?

The only other alternative is to delete your question here and repost in the Java area.  It may be something that needs done with the applet, which I know very little about.

tec
0
 

Author Comment

by:pfads
Comment Utility
This question is being deleted and re-addressed in the JAVA section of experts exchange. Thanx to everyone for their replys.
0
 

Author Comment

by:pfads
Comment Utility
This question has a deletion request Pending
0
 
LVL 3

Expert Comment

by:messentary
Comment Utility
This question no longer is pending deletion
0
 
LVL 3

Expert Comment

by:messentary
Comment Utility
tech, read.  The base target was just part of my comment.  I also did state putting a target in the frames HTML, or did you not see that?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
messentary, I guess you ought to read my comments.  You have given nothing in addition to what was already provided, except copy other's comments and put it all together in one place.  I don't exactly consider that adding to the discussion.

BTW, who are you to say whether or not a question is no longer Pending Deletion?  

pfads, I believe you can delete this question in the area where you would normally grade an answer.  Since no answer has been provided, this should work.

tec
0
 
LVL 3

Expert Comment

by:messentary
Comment Utility
I didn't say this question is no longer pending.  I see it up there with my name, but that wasn't me that put that there.  It follows the same comment as pfads, so I wonder if there was a glich in there somewhere.   I'll put a Q to EE about that.

As for the question, (and this is getting old), My comment was also to place target="body" in the Frames page HTML.  Now I don't see where anyone had suggested to do that.  The <base target> reference was to reiterate other points, as was the _body comment, which cabrio stated.  If my comment were to be made the accepted answer, I would distribute points to others, (look at my history, I do do that).  
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
My apologies then for my statement about the pending issue.  As for the TARGET issue, I don't see a <BASE TARGET="body"> in the frames page.  Perhaps that was your intention, but that is not where it is.  Regardless, the <BASE> tag works on the page containing the links.  Therefore, having the <BASE> tag on the page that creates the frames won't do anything.

tec
0
 

Author Comment

by:pfads
Comment Utility
All,
As I read through this page, I have noticed that information has been supplied to me, from which I have learn't. TARGET="BODY" / "ANYTHING" does work when it's not imbedded within a java applet. I did not know this so I have learn't from this question.

I admit in heinsight, the correct information was given quite only in the answers.

However, This does not help me with my problem, as I want to only change the "body" from within a java applet.

I'm not sure which steps to take to resolve this, It's not worth arguing about. Maybe I'll leave it upto the site owners to sort out whether the question should be deleted or whether points should be allocated.

Thank you all for your efforts so far.

Hannibal.
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
pfads, I still believe that the solution resides in the Applet itself.  The reason is that I believe the Applet has to be told where to update the page and  I would think that this is built into the Applet itself.  Hence, I think you ought to delete this question and ask it in the Java area.  I'm about 99.99999% sure you won't get an answer to solve your problem here.

tec
0
 
LVL 3

Expert Comment

by:messentary
Comment Utility
Tech, <base target in the frames page HTML wouldn't be useful at all.  Not unless the frames page was embedded in a frames page of it's own.  What I put in was :
<frame src="b.htm" name="nav" scrolling="auto" marginheight="0"  marginwidth="0" framespacing="0" target="body">

This would make any links in the Nav page to open in the page named Body,
0
 

Author Comment

by:pfads
Comment Utility
This is the whole of the nav bar :-
<HTML>

<!-- #BeginEditable "doctitle" -->
<title>Quick News with Clock</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<bgsound src="hello.wav" loop="one">

</head>
<body text="000000" link="#FFCC00" vlink="#CCCC00" alink="#CCFF00" onLoad="show5()">
<div align="left">

      
<span id="liveclock" style="position:absolute;left:7;top:0;">
</span>

<script language="JavaScript">
 <!--

/*Upper Corner Live clock script credit: Website Abstraction (www.wsabstract.com) More free scripts here!
*/
 function show5(){
if (!document.layers&&!document.all)
return
 var Digital=new Date()
 var hours=Digital.getHours()
 var minutes=Digital.getMinutes()
 var seconds=Digital.getSeconds()
 var dn="AM"
 if (hours>12){
 dn="PM"
 hours=hours-12
 }
 if (hours==0)
 hours=12
 if (minutes<=9)
 minutes="0"+minutes
 if (seconds<=9)
 seconds="0"+seconds
//change font size here to your desire
myclock="<font size='3' face='Arial' ><b><font size='1'>Current Time:</font></br>"+hours+":"+minutes+":"
 +seconds+" "+dn+"</b></font>"
if (document.layers){
document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if (document.all)
liveclock.innerHTML=myclock
setTimeout("show5()",1000)
 }
 //-->
 </script>
<br>
<br>
<b><Font face="Arial" size=3 Color="red"><Center>IT Security</Center></Font></b>
<b><Font face="Arial" size=1 Color="blue"><Center>Contact: Guy Lavarack 7-430-4125</Center></Font></b>

<P>
<BODY BGCOLOR="grey" LINK="white" VLINK="green">

<P>
<TABLE BORDER="0" CELLSPACING="5">

<a HREF="/intranet/group_policy/index~1.htm" TARGET="_parent">
<img src="/intranet/images/home.gif" width="110" height="25" border="-1"></b></a>

<P><APPLET CODE="treeMenu.class" WIDTH="230" HEIGHT="140" ALIGN="BOTTOM">
                                                            
<PARAM NAME="MENU 1" VALUE="Group Polices">
<PARAM NAME="LINK 1-1" VALUE="index.htm">
<PARAM NAME="OPTION 1-1" VALUE="ITEC Rules">
<PARAM NAME="LINK 1-2" VALUE="itec_101.htm">
<PARAM NAME="OPTION 1-2" VALUE="E-Mail Polices">
<PARAM NAME="LINK 1-3" VALUE="itec_102.htm">
<PARAM NAME="OPTION 1-3" VALUE="Internet Policies">

<PARAM NAME="MENU 2" VALUE="Viruses">
<PARAM NAME="LINK 2-1" VALUE="virus/virus_doc.html">
<PARAM NAME="OPTION 2-1" VALUE="Virus Awareness">
<PARAM NAME="LINK 2-2" VALUE="virus/virusind.html">
<PARAM NAME="OPTION 2-2" VALUE="Search For Viruses">

<PARAM NAME="MENU 3" VALUE="Who's Who?">
<PARAM NAME="LINK 3-1" VALUE="chart/chaindex.html">
<PARAM NAME="OPTION 3-1" VALUE="Structure Chart">
<PARAM NAME="LINK 3-2" VALUE="">
<PARAM NAME="OPTION 3-2" VALUE="Telephone Numbers">

<PARAM NAME="OPTION 1" VALUE="Feedback">
<PARAM NAME="LINK 1" VALUE="feedback/feedback_form.htm">

<PARAM NAME="FONT NAME" VALUE="HELVETICA">
<PARAM NAME="FONT SIZE" VALUE="12">
<PARAM NAME="FONT STYLE" VALUE="BOLD">
<PARAM NAME="FOLDER ICON" VALUE="fC2.gif">
<PARAM NAME="ITEM ICON" VALUE="lloyds.gif">
<PARAM NAME="ICON SPACING" VALUE="3">
<PARAM NAME="FGCOLOR" VALUE="cccc99">
<PARAM NAME="SELCOLOR" VALUE="008000">

</APPLET>

<APPLET CODE="treeMenu.class" WIDTH="230" HEIGHT="290" ALIGN="BOTTOM">

<PARAM NAME="MENU 1" VALUE="IT Security Operational Control">

<PARAM NAME="MENU 1-1" VALUE="Network Security">
<PARAM NAME="LINK 1-1-1" VALUE="firewall/firewall.html">
<PARAM NAME="OPTION 1-1-1" VALUE="Firewalls">
<PARAM NAME="LINK 1-1-2" VALUE="holiday/calendar.htm">
<PARAM NAME="OPTION 1-1-2" VALUE="Holidays">
<PARAM NAME="LINK 1-1-3" VALUE="">
<PARAM NAME="OPTION 1-1-3" VALUE="Documentation">

<PARAM NAME="MENU 1-2" VALUE="I.B.M.">
<PARAM NAME="LINK 1-2-1" VALUE="holiday/calindex.html">
<PARAM NAME="OPTION 1-2-1" VALUE="Holidays">
<PARAM NAME="LINK 1-2-2" VALUE="documentation/ibm/docind.html">
<PARAM NAME="OPTION 1-2-2" VALUE="Documentation">

<PARAM NAME="MENU 1-3" VALUE="Operational Control">
<PARAM NAME="LINK 1-3-1" VALUE="holiday/calindex.html">
<PARAM NAME="OPTION 1-3-1" VALUE="Holidays">
<PARAM NAME="LINK 1-3-2" VALUE="">
<PARAM NAME="OPTION 1-3-2" VALUE="Documentation">

<PARAM NAME="MENU 1-4" VALUE="Cyptography">
<PARAM NAME="LINK 1-4-1" VALUE="holiday/calindex.html">
<PARAM NAME="OPTION 1-4-1" VALUE="Holidays">
<PARAM NAME="LINK 1-4-2" VALUE="">
<PARAM NAME="OPTION 1-4-2" VALUE="Documentation">

<PARAM NAME="MENU 1-5" VALUE="O.E.M.">
<PARAM NAME="LINK 1-5-1" VALUE="holiday/calindex.html">
<PARAM NAME="OPTION 1-5-1" VALUE="Holidays">
<PARAM NAME="LINK 1-5-2" VALUE="">
<PARAM NAME="OPTION 1-5-2" VALUE="Documentation">

<PARAM NAME="OPTION 1" VALUE="What's New">
<PARAM NAME="LINK 1" VALUE="">

<PARAM NAME="MENU 2" VALUE="Other Links">

<PARAM NAME="OPTION 2-1" VALUE="Working Time">
<PARAM NAME="LINK 2-1" VALUE="OpenDatabase"
      valuetype="ref">

<PARAM NAME="OPTION 2-2" VALUE="Phonebook">
<PARAM NAME="LINK 2-2" VALUE="DirectF.htm" valuetype="ref">

<PARAM NAME="OPTION 2-3" VALUE="ITOM">
<PARAM NAME="LINK 2-3" VALUE="OpenDatabase" valuetype="ref">

<PARAM NAME="OPTION 2-4" VALUE="Rail Timetable">
<PARAM NAME="LINK 2-4" VALUE="en" valuetype="ref">

<PARAM NAME="OPTION 2" VALUE="BEM">
<PARAM NAME="LINK 2" VALUE="">

<PARAM NAME="OPTION 3" VALUE="Goverance">
<PARAM NAME="LINK 3" VALUE="">

<PARAM NAME="OPTION 4" VALUE="Discussion Forum">
<PARAM NAME="LINK 4" VALUE="discussion/index.htm">

<PARAM NAME="OPTION 5" VALUE="Notice Board">
<PARAM NAME="LINK 5" VALUE="millenium/millindex.html">

<PARAM NAME="FONT NAME" VALUE="HELVETICA">
<PARAM NAME="FONT SIZE" VALUE="12">
<PARAM NAME="FONT STYLE" VALUE="BOLD">
<PARAM NAME="FOLDER ICON" VALUE="fC2.gif">
<PARAM NAME="ITEM ICON" VALUE="ds.gif">
<PARAM NAME="ICON SPACING" VALUE="3">
<PARAM NAME="FGCOLOR" VALUE="cccc99">
<PARAM NAME="SELCOLOR" VALUE="008000">
</APPLET>

</BODY>

</HTML>


0
 

Author Comment

by:pfads
Comment Utility
And this is my main source:-
<html>

<head>
<title>IT Home</title>
</head>

<frameset border="0" framespacing="0" frameborder="0" rows="70,*">
  <frame src="top.html" name="top" scrolling="no" marginheight="0" marginwidth="0"
  framespacing="0">
  <frameset cols="240,*">
    <frame src="dropmenu/tree.htm" name="nav" scrolling="auto" marginheight="0"
    marginwidth="0" framespacing="0" target="body">
    <frameset rows="1210">
      <frame src="its/itshome.html" name="mybody" scrolling="auto" marginheight="0"
      marginwidth="0" framespacing="0" >
    </frameset>
  </frameset>
  <noframes>
  <body TEXT="000000" BGCOLOR="ffffff">
  </body>
  </noframes>
</frameset>
</html>
0
 
LVL 3

Accepted Solution

by:
messentary earned 50 total points
Comment Utility
Seeing you changed the name of the main page from body to mybody, you will need to change the target to mybody as well.  This references the frames page HTML.  

And as tech said, do add the <base target="mybody"> just below the <body.....> tag in the navigation page HTML
0
 

Author Comment

by:pfads
Comment Utility
This hasn't worked because I believe as tech as stated that the problem is within the applet. The code that you have given WILL work without the applet present. I think the tech and messentary deserve equal share of the points for all of the help currently given. Thanks a lot. messentary I'm sure I can trust that you will distribute the points evenly.
Regards,
Hannibal.
0
 

Author Comment

by:pfads
Comment Utility
Thank you all for your help.
0
 
LVL 6

Expert Comment

by:tecbuilder
Comment Utility
messentary, sorry about missing the additional code in the frame tag.

tec
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now