Jump to content


Photo

Erro Javascript


  • Faça o login para participar
1 reply to this topic

#1 Felito

Felito

    Novato no fórum

  • Usuários
  • 6 posts
  • Sexo:Masculino

Posted 11/09/2010, 11:21

Boas pessoal

estou com este erro

uncaught exception: [Exception... "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: http://www.tgi.com.pt/merdo/scroll/ :: anonymous :: line 435" data: no]

<script type="text/javascript">
var gal = {
init : function() {
if (!document.getElementById || !document.createElement || !document.appendChild) return false;
if (document.getElementById('gallery')) document.getElementById('gallery').id = 'jgal';
var li = document.getElementById('jgal').getElementsByTagNa me('li');
li[0].className = 'active';
for (i=0; i<li.length; i++) {
li[i].style.backgroundImage = 'url(' + li[i].getElementsByTagName('img')[0].src + ')';
li[i].style.backgroundRepeat = 'no-repeat';
li[i].title = li[i].getElementsByTagName('img')[0].alt;
gal.addEvent(li[i],function() {
var im = document.getElementById('jgal').getElementsByTagNa me('li');
for (j=0; j<im.length; j++) {
im[j].className = '';
}
this.className = 'active';
});
}
},
addEvent : function(obj, type, fn) {
if (obj.addEventListener) {
obj.addEventListener(type, fn, false);
}
else if (obj.attachEvent) {
obj["e"+type+fn] = fn;
obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
obj.attachEvent("on"+type, obj[type+fn]);
}
}
}

gal.addEvent(window,'load', function() {
gal.init();
});
</script>


o que ta a sublinhado é a zona do erro.

isto é um conflito com um plug in chamado fancybox

http://www.tgi.com.pt/merdo/scroll/

Resumindo: tou a dois dias de volta desse erro.....

#2 Felito

Felito

    Novato no fórum

  • Usuários
  • 6 posts
  • Sexo:Masculino

Posted 13/09/2010, 11:28

Bem resolvida a situaçao, novo problema

Tenho estas duas paginas a funcionar com modal box e sem problemas:

http://www.tgi.com.p...ll/indexaa.html

http://www.tgi.com.p...oll/indexa.html

Acontece que eu queria um botão que as activasse/mostrasse em rodapé tipo isto:
http://www.tgi.com.p...croll/index.php

já tentei com ajax/php que é como está, e não está a 100%, se abre o primeiro botao o segundo o fancybox já não dá nada

A que se deverá isto? Há alguma alternativa para meter isto a funcionar tipo numa página com botoes mostrar /esconder? e a importar as paginas, que serão tres rodapés, pa 3 botoes.

PS. ignorem o nome dos botoes




1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq