Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
onClick() u mozilli?! help?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 22.02.2004 23:22    Post subject: onClick() u mozilli?! help? Add user to your forum ignore list Reply with quote

ovak neradi mi onClick() u mozilli,
dakle imam slikicu na koju kad se klikne

Code:
<img id="i_treeid_7" alt="" onclick="clickKat('treeid_7')" height=12 src="images/folder_plus.gif" width=14 border=0>


pozove se funkcija u JS-u, i IE radi, u mozilli ne?!

Code:
<script language=javascript>
<!--
function clickKat(katID)
{
  var txtObj = document.all("t_" + katID);
  var imgObj = document.all("i_" + katID);

  if (txtObj.style.display == 'none')
  {
    txtObj.style.display = '';
    imgObj.src = 'images/folderopen.gif';
  }
  else
  {
    txtObj.style.display = 'none';
    imgObj.src = 'images/folder_plus.gif';
  }
}
//-->
</script>


Zasto?! I kako fixat?! tnx!!!

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 22.02.2004 23:41    Post subject: Add user to your forum ignore list Reply with quote

ja nisam expert za ove stvari, ali mozda je nesto trivijalno tipa imas disejblan javaskript support ili ti to opce nije instalirano? Confused
Back to top
View user's profile Send private message
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 23.02.2004 00:11    Post subject: Add user to your forum ignore list Reply with quote

mozilla ne podrzava document.all model...

probaj ovako doci do txtObj i imgObj, tj. dodaj to umjesto one svoje dvije linije (ovako iz glave nabrzaka):
Code:
if (document.getElementById && document.getElementById('t_' + katID) != null)
    var txtObj = document.getElementById('t_' + katID);
    var imgObj = document.getElementById('i_' + katID);
} else if (document.layers && document.layers['t_' + katID] != null) {
    var txtObj = document.layers['t_' + katID];
    var imgObj = document.layers['i_' + katID];
} else if (document.all) {
   var txtObj = document.all('t_' + katID);
   var imgObj = document.all('i_' + katID);
}

Doduse, nisam probao, jer nemam kompletnu stranicu i neda mi se slagat testni page kompletan, ali mozda ce raditi (teoretski trebalo bi raditi u nn4, ie 4, 5, 6 i mozilli)...

Ako ne radi, vici, pa cemo vidjet di sam fulao Smile

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
tic984



Joined: 07 Sep 2003
Posts: 189
Location: Delnice

PostPosted: 23.02.2004 00:43    Post subject: Add user to your forum ignore list Reply with quote

Radi!

Hvala!


Me happy Smile

_________________
ah..
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group