C
Catherine Lynn Smith
I am creating a webpage with dhtml <DIV> layers and I want a link on
one layer to modify the content on another but I seem to keep running
into errors.
Basically I create a layer in the middle of the screen that initially
comes up with a gif image of a house:
<!-- start "house" layer definition for center of screen -->
<DIV id="house" style="position:absolute; left:140px; top:137px;
width:510px; height:325px; z-index:2"><img src="images/house.gif"
width="510" height="325"></DIV>
<!-- end "house" layer definition -->
In another portion of the browser I have a navigation bar built in
another <DIV> layer that includes a number of links:
<!-- start "rtnav" layer definition for lower right navigation links
-->
<DIV id="rtnav" style="position:absolute; left:600px; top:400px;
width:200px; height:100px; z-index:13">
<SPAN id="members" class="rightnav"><a href="javascript:void();"
onClick="gotoMembers();">Member Login</a></SPAN>
</DIV>
<!-- end "rtnav" layer definition -->
In the <HEAD> portion, I have a <SCRIPT> section that includes the
function gotoMembers() {} that I am hoping can either use
document.write('...'); or perhaps a load("members.htm",800);
{preferred} to change the existing content (the gif of a house) to a
small login form:
function gotoMembers() { // pop up member dialog in blueCenter
// Example is being tested in Internet Explorer. I have also used
document.all["house"] and done
// similar testing in Netscape using document.layers["house"] without
success.
// - try using 'load' method to load an external page
// document.getElementById("house").load("members.htm",800);
// - using document.write('...');
document.getElementById("house").document.open();
document.getElementById("house").document.write('this is a test, this
is only a test - please work!!!');
document.getElementById("house").document.close();
}
Whenever I use the 'document.method();' it says "{node}.document is
not an object" where {node} is the method I used to retrieve the DIV
layer ID. I have confirmed that I can use all three constructs to
change the style.visibility='hidden' so it's not something else
somewhere and I have tried this in both Netscape 7.1 and Internet
Explorer Version: 6.0.2800.1106
What am I missing here?
As stated, my preference would be to load a seperate .htm file
including mark-up into the target frame "house" but none of the
document properties appear to be defined for that layer. Any help
would be appreciated.
Kathy
one layer to modify the content on another but I seem to keep running
into errors.
Basically I create a layer in the middle of the screen that initially
comes up with a gif image of a house:
<!-- start "house" layer definition for center of screen -->
<DIV id="house" style="position:absolute; left:140px; top:137px;
width:510px; height:325px; z-index:2"><img src="images/house.gif"
width="510" height="325"></DIV>
<!-- end "house" layer definition -->
In another portion of the browser I have a navigation bar built in
another <DIV> layer that includes a number of links:
<!-- start "rtnav" layer definition for lower right navigation links
-->
<DIV id="rtnav" style="position:absolute; left:600px; top:400px;
width:200px; height:100px; z-index:13">
<SPAN id="members" class="rightnav"><a href="javascript:void();"
onClick="gotoMembers();">Member Login</a></SPAN>
</DIV>
<!-- end "rtnav" layer definition -->
In the <HEAD> portion, I have a <SCRIPT> section that includes the
function gotoMembers() {} that I am hoping can either use
document.write('...'); or perhaps a load("members.htm",800);
{preferred} to change the existing content (the gif of a house) to a
small login form:
function gotoMembers() { // pop up member dialog in blueCenter
// Example is being tested in Internet Explorer. I have also used
document.all["house"] and done
// similar testing in Netscape using document.layers["house"] without
success.
// - try using 'load' method to load an external page
// document.getElementById("house").load("members.htm",800);
// - using document.write('...');
document.getElementById("house").document.open();
document.getElementById("house").document.write('this is a test, this
is only a test - please work!!!');
document.getElementById("house").document.close();
}
Whenever I use the 'document.method();' it says "{node}.document is
not an object" where {node} is the method I used to retrieve the DIV
layer ID. I have confirmed that I can use all three constructs to
change the style.visibility='hidden' so it's not something else
somewhere and I have tried this in both Netscape 7.1 and Internet
Explorer Version: 6.0.2800.1106
What am I missing here?
As stated, my preference would be to load a seperate .htm file
including mark-up into the target frame "house" but none of the
document properties appear to be defined for that layer. Any help
would be appreciated.
Kathy