Javascript Urgent Question
posted by Subzero on 2009-08-18 16:13:53
Hi, in my site http://www.geeknews.it,
i use the jquery component, for the effect when click in the link Login, Inserisci notizia, inserisci immagine.
But i have a problem, i have create this code,I wish that when I click on ApriImg () or ApriDiv (), if the other is open closes.
you can see only if you are logged. For View more, i have create temporary account.
Username: X
Password: qwerty
THANKS!
i use the jquery component, for the effect when click in the link Login, Inserisci notizia, inserisci immagine.
But i have a problem, i have create this code,
<script type="text/javascript"> window.onload = function() { myFadeSize = new fx.FadeSize('postbox', {duration: 700}); myOpacity = new fx.Opacity('postbox', {duration: 700}); myHeight = new fx.Height('postbox', {duration: 700}); myF = new fx.FadeSize('postimg', {duration: 700}); myO = new fx.Opacity('postimg', {duration: 700}); myH = new fx.Height('postimg', {duration: 700}); } function ApriDiv() { if(document.getElementById("postimg").style.opacity=="0.9999" && document.getElementById("postimg").style.visibility=="visible"){ document.getElementById("postimg").style.opacity=="0"; document.getElementById("postimg").style.visibility=="hidden"; } else { if(document.getElementById("postbox").style.display=="none"){ document.getElementById("postbox").style.display=""; } else { myHeight.toggle(); myOpacity.toggle(); } } } function ApriImg() { if(document.getElementById("postbox").style.opacity=="0.9999" && document.getElementById("postbox").style.visibility=="visible"){ document.getElementById("postbox").style.opacity=="0"; document.getElementById("postbox").style.visibility=="hidden"; } else { if(document.getElementById("postimg").style.display=="none"){ document.getElementById("postimg").style.display=""; } else { myH.toggle(); myO.toggle(); } } } </script>
you can see only if you are logged. For View more, i have create temporary account.
Username: X
Password: qwerty
THANKS!

12
try this code:let me know.
function ApriImg() { if(document.getElementById("postbox").style.visibility=="visible"){ document.getElementById("postbox").style.opacity=="0"; document.getElementById("postbox").style.visibility=="hidden"; } if(document.getElementById("postimg").style.display=="none"){ document.getElementById("postimg").style.display=""; } else { myH.toggle(); myO.toggle(); } }

0
No i have try it, but i have the same problem.
if i click one, and is open, if i click the second, the sheets are opened together
if i click one, and is open, if i click the second, the sheets are opened together

12
Posted by Subzero:
No i have try it, but i have the same problem.
if i click one, and is open, if i click the second, the sheets are opened together
No i have try it, but i have the same problem.
if i click one, and is open, if i click the second, the sheets are opened together
Put an alert() message inside the first IF. is it executed?
Answer the question
Top Users
- dail (12)
- livin52 (3)
- camu (3)
- softweb (2)
- Nadine (1)
- Josware (1)
- lfelipecr (1)
- gregoriohc (1)
- Mitu (1)
- ryan714 (1)