Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Eroare de sintaxa in script de ascudere/afisare meniu
#1
Am creat un script pur javascript, fara jQuery care are rolul de ascunde/afisa niste divuri la declansarea unor functiuni, intrebarea mea este ce am gresit cind lam scris.
PHP Code:
<script type="text/javascript">
<!--
var 
m1 document.getElementById('menu_1')
var 
m2 document.getElementById('menu_2')
var 
m3 document.getElementById('menu_3')
var 
m4 document.getElementById('menu_4')
var 
m5 document.getElementById('menu_5')
var 
m6 document.getElementById('menu_6')
function 
show_menu_1(){
if (
m1.style.display == "none")
    
m2.style.display "none";
    
m3.style.display "none";
    
m4.style.display "none";
    
m5.style.display "none";
    
m6.style.display "none";
    
m1.style.display "inline";
else
    
m1.style.display "none";
}
function 
show_menu_2(){
if (
m2.style.display == "none")
    
m1.style.display "none";
    
m3.style.display "none";
    
m4.style.display "none";
    
m5.style.display "none";
    
m6.style.display "none";
    
m2.style.display "inline";
else
    
m2.style.display "none";
}
function 
show_menu_3(){
if (
m3.style.display == "none")
    
m2.style.display "none";
    
m1.style.display "none";
    
m4.style.display "none";
    
m5.style.display "none";
    
m6.style.display "none";
    
m3.style.display "inline";
else
    
m3.style.display "none";
}
function 
show_menu_4(){
if (
m4.style.display == "none")
    
m2.style.display "none";
    
m3.style.display "none";
    
m1.style.display "none";
    
m5.style.display "none";
    
m6.style.display "none";
    
m4.style.display "inline";
else
    
m4.style.display "none";
}
function 
show_menu_5(){
if (
m5.style.display == "none")
    
m2.style.display "none";
    
m3.style.display "none";
    
m4.style.display "none";
    
m1.style.display "none";
    
m6.style.display "none";
    
m5.style.display "inline";
else
    
m5.style.display "none";
}
function 
show_menu_6(){
if (
m6.style.display == "none")
    
m2.style.display "none";
    
m3.style.display "none";
    
m4.style.display "none";
    
m5.style.display "none";
    
m1.style.display "none";
    
m6.style.display "inline";
else
    
m6.style.display "none";
}
-->
</script> 
Un forum simplu pentru toti, si pentru ca parerea ta conteaza!
Reply
Anunt important
Daca ti-a fost de folos articolul de mai sus te rugam sa ne sustii in semn de apreciere.
Ar insemna foarte mult pentru noi daca ai apasa oricare din butoanele de recomandare de mai jos (in special pe cel de facebook) sau chiar pe mai multe.
Faptul ca suntem apreciati ne motiveaza sa facem o treaba mai buna si implicit sa oferim mai mult, ajuta comunitatea sa creasca.




Messages In This Thread
Eroare de sintaxa in script de ascudere/afisare meniu - by nickname - 07-19-2012, 09:42 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  Script status yahoo Admin 7 21,083 10-04-2012, 05:45 PM
Last Post: Diablo
  Problema script pe IE8 si Safari nickname 10 25,828 08-21-2012, 07:15 PM
Last Post: nickname
  "Loading..." script nickname 4 10,615 05-16-2012, 10:50 AM
Last Post: Admin
  Script asemanator cu nyroModal nickname 3 9,627 03-27-2012, 09:33 PM
Last Post: nickname
  Script indentificare browser nickname 3 9,229 02-07-2012, 08:37 PM
Last Post: Diablo
  Forum script nickname 5 12,175 02-07-2012, 03:55 PM
Last Post: Admin
  Script bancuri : Admin 8 18,433 01-27-2012, 07:23 PM
Last Post: Admin
  Script site muzica Admin 12 30,553 12-17-2011, 01:24 AM
Last Post: Admin
  script web director Pokemon 6 13,994 08-06-2011, 12:36 AM
Last Post: Admin
  plusPHP Image Host Script petrisor 3 9,933 08-05-2011, 08:52 PM
Last Post: Pokemon



Users browsing this thread: