galera, peguei esse codigo na pagina dda wm...
eh um menu FolderTree, mas ele esta aberto inicialmente.
ja fucei e nao conseguie fazer ele iniciar fechado, alguem pode ajudar.
link do menu
--CODIGO--
<script language="javascript">
document.onmouseover = mOver ;
document.onmouseout = mOut ;
function mOver() {
var eSrc = window.event.srcElement ;
if (eSrc.className == "item") {
window.event.srcElement.className = "highlight";
}
}
function mOut() {
var eSrc = window.event.srcElement ;
if (eSrc.className == "highlight") {
window.event.srcElement.className = "item";
}
}
var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4))?true:false;
ver4 = (NS4 || IE4) ? true : false;
isExpanded = false;
function getIndex($1) {
ind = null;
for (i=0; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.id == $1) {
ind = i;
break;
}
}
return ind;
}
function arrange() {
nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
for (i=firstInd+1; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.visibility != "hide") {
whichEl.pageY = nextY;
nextY += whichEl.document.height;
}
}
}
function FolderInit(){
if (NS4) {
firstEl = "mParent";
firstInd = getIndex(firstEl);
showAll();
for (i=0; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
}
arrange();
}
else {
tempColl = document.all.tags("DIV");
for (i=0; i<tempColl.length; i++) {
if (tempColl(i).className == "child") tempColl(i).style.display = "none";
}
}
}
function FolderExpand($1,$2) {
if (!ver4) return;
if (IE4) { ExpandIE($1,$2) }
else { ExpandNS($1,$2) }
}
function ExpandIE($1,$2) {
Expanda = eval($1 + "a");
Expanda.blur()
ExpandChild = eval($1 + "Child");
if ($2 != "top") {
ExpandTree = eval($1 + "Tree");
ExpandFolder = eval($1 + "Folder");
}
if (ExpandChild.style.display == "none") {
ExpandChild.style.display = "block";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = "images/Lminus.gif"; }
else { ExpandTree.src = "images/Tminus.gif"; }
ExpandFolder.src = "images/openfoldericon.gif";
}
else { mTree.src = "images/topopen.gif"; }
}
else {
ExpandChild.style.display = "none";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = "images/Lplus.gif"; }
else { ExpandTree.src = "images/Tplus.gif"; }
ExpandFolder.src = "images/foldericon.gif";
}
else { mTree.src = "images/top.gif"; }
}
}
function ExpandNS($1,$2) {
ExpandChild = eval("document." + $1 + "Child")
if ($2 != "top") {
ExpandTree = eval("document." + $1 + "Parent.document." + $1 + "Tree")
ExpandFolder = eval("document." + $1 + "Parent.document." + $1 + "Folder")
}
if (ExpandChild.visibility == "hide") {
ExpandChild.visibility = "show";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = "images/Lminus.gif"; }
else { ExpandTree.src = "images/Tminus.gif"; }
ExpandFolder.src = "images/openfoldericon.gif";
}
else { mTree.src = "images/topopen.gif"; }
}
else {
ExpandChild.visibility = "hide";
if ($2 != "top") {
if ($2 == "last") { ExpandTree.src = "images/Lplus.gif"; }
else { ExpandTree.src = "images/Tplus.gif"; }
ExpandFolder.src = "images/foldericon.gif";
}
else { mTree.src = "images/top.gif"; }
}
arrange();
}
function showAll() {
for (i=firstInd; i<document.layers.length; i++) {
whichEl = document.layers[i];
whichEl.visibility = "show";
}
}
with (document) {
write("<STYLE TYPE='text/css'>");
if (NS4) {
write(".parent { color: black; font-size:9pt; line-height:0pt; color:black; text-decoration:none; margin-top: 0px; margin-bottom: 0px; position:absolute; visibility:hidden }");
write(".child { text-decoration:none; font-size:9pt; line-height:15pt; position:absolute }");
write(".item { color: black; text-decoration:none }");
write(".highlight { color: blue; text-decoration:none }");
}
else {
write(".parent { font: 12px/13px; Times; text-decoration: none; color: black }");
write(".child { font:12px/13px Times; display:none }");
write(".item { color: black; text-decoration:none; cursor: hand }");
write(".highlight { color: blue; text-decoration:none }");
write(".icon { margin-right: 5 }")
}
write("</STYLE>");
}
onload = FolderInit;
</script>
- Fórum WMO
- → Viewing Profile: Posts: TwL
Community Stats
- Group Usuários
- Active Posts 69
- Profile Views 1067
- Member Title Normal
- Age Age Unknown
- Birthday Birthday Unknown
-
Sexo
Não informado
0
Neutral
User Tools
Friends
TwL hasn't added any friends yet.
Latest Visitors
Posts I've Made
In Topic: Menu Arvore
15/10/2007, 13:59
In Topic: Slide Menu
25/09/2007, 21:54
tenta ajudar...
<a target="_top" href="file:///C:/Documents%20and%20Settings/mceletronico/Meus%20documentos/Minhas%20Webs/nova_pagina_1.htm">
sddscsdsd</a>
mudando a opçao target
_self -> mesma janela pai
_blank ->nova janela
.
.
.
no caso de iframe vc coloca o xxx da opção name="xxx" do iframe em target do link. dai qndo clicar no link
abre dentro do iframe
<a target="_top" href="file:///C:/Documents%20and%20Settings/mceletronico/Meus%20documentos/Minhas%20Webs/nova_pagina_1.htm">
sddscsdsd</a>
mudando a opçao target
_self -> mesma janela pai
_blank ->nova janela
.
.
.
no caso de iframe vc coloca o xxx da opção name="xxx" do iframe em target do link. dai qndo clicar no link
abre dentro do iframe
In Topic: Duvida Com String
21/09/2007, 11:03
Valeu, Funcionou certinho...
Abraço
Abraço
In Topic: Php + Mysql
12/06/2007, 09:44
entao, eu estava testando a função mysql_create_db("my_db") como eu disse...
mas apareceu esse erro:
Fatal error: Call to undefined function mysql_create_db() in c:\arquivos de programas\apache group\Apache\htdocs\www\mysql\cria_db2.php on line 5
o codigo foi o do manual do php:
<?php
$link = mysql_pconnect("localhost", "mysql_user", "mysql_password")
or die("Não pude conectar: " . mysql_error());
if (mysql_create_db("my_db")) {
print ("Banco de dados criado\n");
} else {
printf ("Erro criando o banco de dados: %s\n", mysql_error());
}
?>
como eu disse funcino com o mysql_query(CREATE DATABASE *******);
mas qual o problema no codigo a cima????
valeu.
mas apareceu esse erro:
Fatal error: Call to undefined function mysql_create_db() in c:\arquivos de programas\apache group\Apache\htdocs\www\mysql\cria_db2.php on line 5
o codigo foi o do manual do php:
<?php
$link = mysql_pconnect("localhost", "mysql_user", "mysql_password")
or die("Não pude conectar: " . mysql_error());
if (mysql_create_db("my_db")) {
print ("Banco de dados criado\n");
} else {
printf ("Erro criando o banco de dados: %s\n", mysql_error());
}
?>
como eu disse funcino com o mysql_query(CREATE DATABASE *******);
mas qual o problema no codigo a cima????
valeu.
In Topic: Ajuda Com Preço
17/05/2007, 13:34
valeu, xKuRt
vo da uma olhada
vo da uma olhada
- Fórum WMO
- → Viewing Profile: Posts: TwL
- Privacy Policy
- Regras ·