Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Access Denied Code:0 ???????????

[es] :: Javascript i AJAX :: Access Denied Code:0 ???????????

[ Pregleda: 865 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

djovan01

Član broj: 75700
Poruke: 196
*.ip.mcleodusa.net.



Profil

icon Access Denied Code:0 ???????????27.07.2009. u 19:55 - pre 179 meseci

Opet ja sa pitanjem u vezi drop down menija koji nece nikako da funkcionise. Elem sve sam ponovo uradila kako je pisalo u tutorijalu i dosla do sledece greske.
Code:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; FDM)
Timestamp: Mon, 27 Jul 2009 18:54:54 UTC


Message: Access is denied.

Line: 15
Char: 19
Code: 0
URI: http://www.mrvadesign.890m.com...009/pro_dropdown_2/stuHover.js



Ono sto sam zapazila da sve ovo lepo funkcionise kada porekenem stranicu lokalno ali na serveru ne radi. Da li imate pojma u cemu je problem

Ovo je javascripta
Code:

stuHover = function() {
    var cssRule;
    var newSelector;
    for (var i = 0; i < document.styleSheets.length; i++)
        for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
            {
            cssRule = document.styleSheets[i].rules[x];
            if (cssRule.selectorText.indexOf("LI:hover") != -1)
            {
                 newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
                document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
            }
        }
    var getElm = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<getElm.length; i++) {
        getElm[i].onmouseover=function() {
            this.className+=" iehover";
        }
        getElm[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" iehover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", stuHover);

 
Odgovor na temu

Aleksandar Ružičić
Software Architect, Appricot d.o.o.
Beograd

Član broj: 26939
Poruke: 2881

Jabber: krckoorascic@gmail.com
Sajt: krcko.net


+44 Profil

icon Re: Access Denied Code:0 ???????????27.07.2009. u 23:53 - pre 179 meseci
u osmici su uveli dosta security "novina" tako da je mozda sad zabranjeno menjati cssRule-ove on-the-fly ili mozda je nesto drugo u pitanju (nisam se mnogo igrao sa js-om u 8-ici, jos uvek...)

ali koliko vidim ovo ti je kod za :hover pseudo-klasu na non-a elementima, sto je od 7ice nepotrebno jer su u toj verziji dodali normalnu podrsku za :hover.
tako da mozes da pokusas da ogranicis taj kod samo na IE6 i ranije verzije, recimo ovako:

Code:

if (window.ActiveXObject && !window.XMLHttpRequest && !window.opera && window.attachEvent) {
  window.attachEvent('onload', function() {
    var cssRule;
    var newSelector;
    for (var i = 0; i < document.styleSheets.length; i++)
        for (var x = 0; x < document.styleSheets[i].rules.length ; x++)
            {
            cssRule = document.styleSheets[i].rules[x];
            if (cssRule.selectorText.indexOf("LI:hover") != -1)
            {
                 newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover");
                document.styleSheets[i].addRule(newSelector , cssRule.style.cssText);
            }
        }
    var getElm = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<getElm.length; i++) {
        getElm[i].onmouseover=function() {
            this.className+=" iehover";
        }
        getElm[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" iehover\\b"), "");
        }
    }
  });
}

 
Odgovor na temu

[es] :: Javascript i AJAX :: Access Denied Code:0 ???????????

[ Pregleda: 865 | Odgovora: 1 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.