Click to See Complete Forum and Search --> : In-window links?


Thel
11-28-2003, 04:46 AM
Hello everyone ..

I'm pretty new to coding with javascript so thought best to ask here what code I should use.

I want to have a set of links that change the content of a window / layer when clicked without changing the actual page itself. Also I am using Dreamweaver MX for this because of the module I'm taking at uni, if this makes any diffference.

I'm pretty sure this is possible as I have seen it done before .. but as said I'm not that confident with coding yet so don't know how to manipulate the existing code.

Thank you for any help.

Mike

P.S.
A link that uses this coding:
http://www.lincolnstorm.co.uk/pp.php
(I know this page is using php but is it possible with javascript? Also I have seen the link to http://www.dynamicdrive.com/ but from there I still couldn't figure it out)

Mr J
11-28-2003, 04:29 PM
The following will change the contents of a layer


<script language="javascript">
<!--
function show(txt){
document.getElementById('text').innerHTML=txt;
}

function hide(){
document.getElementById('text').innerHTML="";
}
// -->
</script>


<div id="text" style="position:absolute;left:100px;top:100px;width:200px;height:100px;background: #C0C0C0;border: 4px ridge #A0A0EE"></div>

<A href="#null" onmouseover="show('Have your messages sent to this layer')">Link One</A>

<A href="#null" onmouseover="show('Using more attributes you can create some very effective boxes.')" onmouseout="hide()">Link two</a>