It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

how to do sth like that?

how to do sth like that?

Postby justyna on Wed Sep 05, 2007 5:48 pm

Hi!
There is a nice feature that I've seen on data recovery services site.
When you move mouse over the "Country", in the top on the right side of the page, then the frame pop ups,
with he list of country to choose. I want o do sth like that on my page, but I've just started to learn javascript,
and I have no idea how to do it...can enybody help me out?
Here is a link to that site where I've seen these feature: www.salvagedata.com
Thank for your help.
justyna
 
Posts: 4
Joined: Wed Sep 05, 2007 5:43 pm

Postby matt_raleigh on Fri Sep 21, 2007 3:07 pm

I think you want something like this: -the styling

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sliding Menu example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>

.menu {
left:-800px;
position:relative;

}

#slide {

position: absolute;
top: 5px;
left: -800px;
}
</style>

<script type="text/javascript" language="javascript">

// sliding menu
if (document.getElementById){
stdBrowser=true;
}

else {
stdBrowser=false;
}

function toggleMenu(currElem,nextPos) {
if(stdBrowser) {
menuObj = document.getElementById(currElem).style;
}

else {
menuObj =eval("document." + currElem)
}

if(stdBrowser) {
menuObj.left = nextPos + "px"
}

else {
menuObj.left = nextPos;
}
}

function hideMenu(currElem,origPosition) {

if(stdBrowser) {
menuObj = document.getElementById(currElem).style;
}

else {
menuObj =eval("document." + currElem)
}

if(stdBrowser) {
menuObj.left = origPosition + "px"
}

else {
menuObj.left = origPosition;
}


}


</script>
</head>
<body>


<div style="width:100px" onMouseOver="toggleMenu('slide',60)" onMouseOut="hideMenu('slide',-800)" >Country

<div id="slide" class="menu">
<table>
<tr>
<td><a href = "#">US</a></td>
</tr>
<tr>
<td><a href = "#k">UK</a></td>
</tr>
<tr>
<td><a href = "#">Australia</a></td>
</tr>
</table>

</div>
</div>

</body>
</html>
User avatar
matt_raleigh
 
Posts: 15
Joined: Thu Sep 20, 2007 6:45 pm

Postby knifeinback on Sat Sep 22, 2007 2:50 am

css span stuff works too.
I used it for a MySpace (cause I couldn't use JS) once.
Shouldn't be hard to find out how to do.

google
User avatar
knifeinback
100+ Club
 
Posts: 136
Joined: Fri Jul 27, 2007 10:41 am
Location: 4170: Brisbane


Who is online

Users browsing this forum: No registered users and 2 guests