Click to See Complete Forum and Search --> : frames
bmendez
11-29-2002, 11:38 AM
hi... i need some help!!.. i have two frames: Header and main..
i need when the user click a button that is in the main frame, i need to refresh the header frame... how can i do this??
anyone could help me?!?!?!
tomroten_10
11-29-2002, 12:55 PM
First in your main.html or index.html file you must state the name of the frame along with the file src so:
<frame src="header.html" name="header">
Then when you want to make a link in the main frame that puts a page in the header frame you must put a target in the link like this:
<a href="page.html" target="header">Click Here</a>
See. You can do the same thing with other frames too. Just remember to name the frame and express a target frame in the link. Tell me how it goes.
bmendez
11-29-2002, 01:09 PM
what i wanna do is reload the header frame.... but i dont know how to do that..
tomroten_10
11-29-2002, 01:16 PM
I don't know how to do that but try some tutorials. They may help a little bit. Try http://www.webmonkey.com
Charles
11-29-2002, 01:37 PM
It's easily done but since you'll end up with a link that that will not work for JavaScript free users you will need to write the link with JavaScript.
<script type="text/javascript">
<!--
document.write('<a href="#">Refresh the Header Frame</a>');
document.links[document.links.length-1].onclick = function () {window.parent.header.reload(true); return false};
// -->
</script>
See http://developer.netscape.com/docs/manuals/js/client/jsref/location.htm#1194198 for details.
gil davis
11-29-2002, 01:37 PM
window.top.header.location.reload(true);
Where "header" is the name of the frame to reload.
Note that if somehow the user has navigated to another domain, you will not be able to access it using script .