mark951
asked on
Javascript Layer Show
I am trying to User a Imagemap to click and show a layer from an external htm file. here is my code so far.
document.frames["layer1"]. location=" newlocatio n.html"
//loads htm file into the layer
//the Iframe
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
will this even work? thanks
document.frames["layer1"].
//loads htm file into the layer
//the Iframe
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
will this even work? thanks
ASKER
How do I get it to show up within a table on my current page when there is a mouse over event?
Example with image and image map:
<MAP NAME="map1">
<AREA
HREF="#" onclick="document.getEleme ntById('la yer1').loc ation.href ='newlocat ion.html'; "
SHAPE=RECT COORDS="6,116,97,184">
</AREA>
</MAP>
<IMG SRC="testmap.gif"
ALT="" BORDER=0 WIDTH=300 HEIGHT=300
USEMAP="#map1">
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
<MAP NAME="map1">
<AREA
HREF="#" onclick="document.getEleme
SHAPE=RECT COORDS="6,116,97,184">
</AREA>
</MAP>
<IMG SRC="testmap.gif"
ALT="" BORDER=0 WIDTH=300 HEIGHT=300
USEMAP="#map1">
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
What do you mean by mouse over a event?
An example of a mouse over event could be to replace onclick with onmouseover in my example above.
And to let appear within your table, just put the
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
in one of your table cells.
An example of a mouse over event could be to replace onclick with onmouseover in my example above.
And to let appear within your table, just put the
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
in one of your table cells.
ASKER
This is what I did:
<script type="text/javascript">
document.frames["layer1"]. location=" mission.ht m"
</script>
//My image map
<area shape="rect" coords="83, 128, 202, 156" href="#" onclick="document.getEleme ntById('la yer1').loc ation.href ='mission. htm';">
//put the Iframe in the Cell where I want the mission page to be displayed on my main.asp page
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
I must have did something wrong b/c I get this error:
document.getElementById(.. .).locatio n' is null or not an object
<script type="text/javascript">
document.frames["layer1"].
</script>
//My image map
<area shape="rect" coords="83, 128, 202, 156" href="#" onclick="document.getEleme
//put the Iframe in the Cell where I want the mission page to be displayed on my main.asp page
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
I must have did something wrong b/c I get this error:
document.getElementById(..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could also do by id
<IFRAME SRC="mission.htm" width=100% height=100% name="layer1" id="layer1"></IFRAME>
<script type="text/javascript">
document.getElementById('l
</script>