regedits Posted May 5, 2006 Report Share Posted May 5, 2006 Uzrakstīju Javascript kas Explorerī uz localhosta (Apache) strādā, bet uz IE servera nestrādā, savukārt pārlūkprogrammā Firefox javascripts strādā gan uz Apache gan IE...kas varētu būt par problēmu?? Link to comment Share on other sites More sharing options...
v3rb0 Posted May 5, 2006 Report Share Posted May 5, 2006 līks javascripts. tak rādi scriptu, kristala bumba saplīsa / © bubu Link to comment Share on other sites More sharing options...
bubu Posted May 5, 2006 Report Share Posted May 5, 2006 Vēl ir jāpiebilst, ka Apache serverim nav nekāda sakara ar tavu Javaskriptu. Apache ir serveris, bet Javaskripts izpildās uz browsera - klienta galā. Link to comment Share on other sites More sharing options...
regedits Posted May 5, 2006 Author Report Share Posted May 5, 2006 Bet ja nav saistības - tad kā var būt tā, ka uz mana localhosta (Apache) viss javascripts strādā gan uz IE browsera gan firefox, bet uzlikts uz servea (IIS) straadaa tikai uz firefox (uz IE nee) un javascripts ir taads: " window.onload = function () { var x = document.getElementsByTagName('div'); for (var i=0;i<x.length;i++) { if (x.className == 'label') x.onclick = clickNav; } closeNav(); if (top.setNav) setNav(top.setNav,'currentPage'); } function closeNav() { var x = document.getElementsByTagName('div'); for (var i=0;i<x.length;i++) { if (x.className == 'content') x.style.display = 'none'; } } function clickNav(e) { if (!e) var e = window.event; if (e.target) var tg = e.target; else if (e.srcElement) var tg = e.srcElement; while (tg.nodeName != 'DIV') // Safari GRRRRRRRRRR tg = tg.parentNode; var nextSib = tg.nextSibling; while (nextSib.nodeType != 1) nextSib = nextSib.nextSibling; var nextSibStatus = (nextSib.style.display == 'none') ? 'block' : 'none'; nextSib.style.display = nextSibStatus; } function setNav(page,newID) { var test = page.indexOf('#')+1; if (test) page = page.substring(0,test-1); var x = document.getElementsByTagName('a'); var i; for (i=0;i<x.length;i++) { if (x.href == page) { x.id = newID; break; } } if (i < x.length && newID == 'currentPage') { var parDiv = x; while (parDiv.parentNode.tagName == 'DIV') { parDiv = parDiv.parentNode; parDiv.style.display = 'block'; } } } " Link to comment Share on other sites More sharing options...
Delfins Posted May 5, 2006 Report Share Posted May 5, 2006 Tev vēlreiz saka - nav nekāda sakara JS ar Apache/IIS serveri. Izmanto debugeri vai treiso ar mesagiem Link to comment Share on other sites More sharing options...
regedits Posted May 5, 2006 Author Report Share Posted May 5, 2006 Kaadu debugeri ieteiktu? pls Link to comment Share on other sites More sharing options...
bubu Posted May 5, 2006 Report Share Posted May 5, 2006 Ja firefox, tad Venkman. Ja IE, tad paša MS - Microsoft Script Debugger (novelkams no ms lapas pa velti). Te ir linki uz tiem: http://php.lv/f/index.php?showtopic=2935 Link to comment Share on other sites More sharing options...
regedits Posted May 5, 2006 Author Report Share Posted May 5, 2006 PALDIEs :) Link to comment Share on other sites More sharing options...
Recommended Posts