Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[Q] How to update one DIV frame from another???

Status
Not open for further replies.

CyanBlue

Technical User
Mar 6, 2002
16
US
Howdy... :)

I have two DIV frames...
---
<body>
<div id="leftcol"><?php include("navL.html"); ?></div>
<div id="content"><?php include("content.php"); ?></div>
</body>
---
and in the leftcol DIV frame, I have navL.html file loaded... (If you know of better way of doing it, please let me know... ;))

This is the content of the navL.html file...
---
<script type="text/javascript">
<!--

function load(arg)
{
alert(arg);
document.getElementByID("content").src = arg + ".html";
}

//-->
</script>

<a href="#" onClick="javascript:load('test1');">test1</a>
<BR>
<a href="#" onClick="javascript:load('test2');">test2</a>
---
In there I have two links which I want to use to update the content DIV frame with either test1.html or test2.html depending on the link that is clicked, but somehow it is not working... :(

Does anybody know how I can solve this problem???

Thank you very much... :)
 
Thanks for the reply, cLFlaVA... :)

I've got to admit that I just did search on the Internet and that's what came up... :D

I did change that to getElementById(), yet still no luck... :(

I'd appreciate it if you could give me some other suggestions...

Thanks alot... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top