ďťż
Podstrony
|
telcocafeodnośnie artykułu z 04/2003 KŚ Ekspert "Oko na świat" i POSTU więc wszystko jest ok ale są jakieś błędy w skrypcie i nie wiem gdzi leży przyczyna tego. Prosze o pomoc - oto skrypt:<HTML> <HEAD> <script LANGUAGE='Javascript'> <!- function startReload() { setTimeout("ReloadPic()',10000); } function ReloadPic() { document.image1.src='fotka.jpg'; startReload(); return true; } //-> </SCRIPT> </HEAD> <BODY onload='startReload()'> <P>Lenart Pawel:</P> <IMG NAME='image1' SRC='fotka.jpg'> </BODY> </HTML> Plik nosi nazwę document.html P.S. Prosze nie pisać w czym jest problem bo ja JS sięnie znam jakby można było to prosiłbym o poprawny kod lub chociaż wskazanie błędu i jak go poprawić. Z góry dziękuję za pomoc Pozdrawiam Linia 9, zamiast ' napisales " setTimeout("ReloadPic()',10000) Powinno byc: setTimeout('ReloadPic()',10000) po wrzuceniu na serwer kod sięzmienił wygląda tak: <HTML> <HEAD> <!-- Kerio Popup Killer - script has been inserted by KPF --> <script type="text/javascript"> <!-- var NoPopupsDone = 0;var CurrWindowOpen = window.open;var CurrWindowOpen2 = window.open;var orig_setTimeout = window.setTimeout;var orig_setInterval = window.setInterval;if ( window.showModelessDialog ) { var orig_showModelessDialog = window.showModelessDialog;} if ( window.showModalDialog ) { var orig_showModalDialog = window.showModalDialog;} var cnt = 0;var popupType = "direct";var KPF_LOG_URL = "http://127.0.0.1:44501/pl.html?";var KPF_TIMEOUT = 100;var onunloadFlag = false;var KPF_CompleteLoaded = false; function nullMethod() {}function nullWindow() { this.window = new Object(); this.document = new Object(); this.document.open=this.document.close=this.document.write=this.document.writeln=nullMethod; this.alert=this.back=this.blur=this.captureEvents=this.clearInterval=this.clearTimeout=this.close=this. confirm=this.dump=this.escape=this.focus=this.forward=this.GetAttention=this.getSelection=this.home=this. moveBy=this.moveTo=this.open=this.print=this.prompt=this.releaseEvents=this.resizeBy=this.resizeTo=this. scroll=this.scrollBy=this.scrollByLines=this.scrollByPages=this.scrollTo=this.setCursor=this.setInterval=this. setTimeout=this.sizeToContent=this.stop=this.unescape=this.updateCommands=nullMethod;} function destroyIframe(ifr){ if (ifr != document.getElementById("kpfLogFrame")) { var x = ifr.parentNode.removeChild(ifr); delete x; };} function sendStream(s, idx, kpf_pt){ try { var ifr = document.getElementById("kpfLogFrame"); var tmp = ifr.cloneNode(true); tmp.id = "ifr_" + idx; var s2 = "srv=" + document.location + "&url=" + s + "&pty=" + kpf_pt; tmp.src = KPF_LOG_URL + escape(s2); document.body.appendChild(tmp); } catch (e) { orig_setTimeout("sendStream('" + s + "', " + idx + ",'" + kpf_pt + "')", KPF_TIMEOUT); }} function sendUrl(url){ if (onunloadFlag) sendStream(url, cnt++, popupType); else { try { orig_setTimeout("sendStream('" + url + "', cnt++,'" + popupType + "')", KPF_TIMEOUT); } catch (e) {} }} function newOpen(url, name, atr) {wnd = new nullWindow();wnd.focus = nullWindow;wnd.opener = this.window;sendUrl(url);return(wnd); } function newOpen2(url, name, atr) { sendUrl(url); return(new nullWindow());} function stopPopups(kpf_pt) { popupType = kpf_pt; CurrWindowOpen = window.open; window.open = newOpen2; } function startPopups(kpf_pt) { window.open = CurrWindowOpen; popupType = kpf_pt;} function my_setTimeout(one, two) { try { return orig_setTimeout("stopPopups('ontimer');"+one+";startPopups('direct' );", two); } catch (e) {}} function my_setInterval(one, two) { try { return orig_setInterval("stopPopups('ontimer');"+one+";startPopups(' direct');", two); } catch (e) { }} function my_onload() { var my_retcode = true; stopPopups("onload"); if(orig_onload) my_retcode = orig_onload(); startPopups("direct"); KPF_CompleteLoaded = true; return my_retcode; } function my_unload() { var my_retcode = true; var cnt = 0; stopPopups("onunload"); onunloadFlag = true; if(orig_onunload) my_retcode = orig_onunload(); startPopups("direct"); return my_retcode;} function my_windowopen(url, name, atr){ if ( (! KPF_CompleteLoaded) || (document.all && event != null && event.type == "mouseover") ) { if ( ! KPF_CompleteLoaded) { popupType = "direct"; } else { popupType = "mouseover"; } sendUrl(url); popupType = "direct"; } else { try { return CurrWindowOpen2(url, name, atr); } catch (e) {} }} function my_showModelessDialog (url , arguments , features) { if (!NoPopupsDone) { var wnd = new nullWindow(); popupType = "direct_dialog"; sendUrl(url); popupType = "direct"; return wnd; } if (popupType!="direct" | (event && event.type == "mouseover") ) { var curr_popup = popupType; if (event && event.type == "mouseover") { popupType = "mouseover"; } popupType = popupType+"_dialog"; sendUrl(url); popupType = curr_popup; return ( new nullWindow() ); } else { return ( orig_showModelessDialog(url , arguments , features) ); } } function my_showModalDialog (url , arguments , features) { if (!NoPopupsDone) { popupType = "direct_dialog"; sendUrl(url); popupType = "direct"; return ""; } if (popupType!="direct" | (event && event.type == "mouseover") ) { var curr_popup = popupType; if (event && event.type == "mouseover") { popupType = "mouseover"; } popupType = popupType+"_dialog"; sendUrl(url); popupType = curr_popup; return ""; } else { return ( orig_showModalDialog(url , arguments , features) ); } } function nopopups() { if(!NoPopupsDone) { NoPopupsDone = 1; orig_onload = window.onload; orig_onunload = window.onunload; window.onload = my_onload; window.onunload = my_unload; window.open = my_windowopen; }} window.setTimeout = my_setTimeout;window.setInterval = my_setInterval;window.open = newOpen;if ( orig_showModelessDialog ) { window.showModelessDialog = my_showModelessDialog;}if ( orig_showModalDialog ) { window.showModalDialog = my_showModalDialog;} //--> </script> <!-- Kerio Popup Killer - end of the script inserted by KPF --> <script LANGUAGE='Javascript'> <!- function startReload() { setTimeout('ReloadPic()',10000); } function ReloadPic() { document.image1.src='fotka.jpg'; startReload(); return true; } //-> </SCRIPT> </HEAD> <BODY onload='startReload()'> <P>Lenart Pawel:</P> <IMG NAME='image1' SRC='fotka.jpg'> </BODY> </HTML><script type="text/javascript"><!-- document.writeln('<'+'scr'+'ipt type="text/javascript" src="http://home.hit.stat.pl/_'+(new Date()).getTime()+'/script.js?id=nAuVf0xcUXe0wRpEbR8KeYXCHUdRvW9Sw.nQiTAD9VX. 07"></'+'scr'+'ipt>'); //--></script><!-- Kerio Popup Killer - script has been appended by KPF --> <iframe id="kpfLogFrame" src="http://127.0.0.1:44501/pl.html?START_LOG" onload="destroyIframe(this)" style="display:none;"> </iframe> <script type="text/javascript"> <!-- nopopups(); //--> </script> <!-- Kerio Popup Killer - end of the script appended by KPF--> i wyskakuje wiersz 31, znak 1, błąd: błąd składni, kod 0 wiersz 47, znak 1, błąd: oczekiwanie obiektu, kod 0 nie wiem co to znaczy POMOCY popatrz dobrze czemu kod sie zmienil Kerio Popup Killer wyłacz go Użytkownik Gruchi edytował ten post 25 grudzień 2005, 19:20 <HTML> <HEAD> <script LANGUAGE='Javascript'> <!- function startReload() { setTimeout('ReloadPic()',10000); } function ReloadPic() { document.image1.src='fotka.jpg'; startReload(); return true; } //-> </SCRIPT> </HEAD> <BODY onload='startReload()'> <P>Lenart Pawel:</P> <IMG NAME='image1' SRC='fotka.jpg'> </BODY> </HTML> wiersz 5, znak 1, błąd: błąd składni, kod 0 wiersz 21, znak 1, błąd: oczekiwanie obiektu, kod 0 |
|||
Sitedesign by AltusUmbrae. |