Datuve :: Forums :: Arhīvs :: Pulkstena kods Javascript, kuru nerada Internet Explorer 8

Datuve

Mana Datuve

Reģistrācija | Noteikumi | Paroles atjaunošana



Forums

Ieskaties


Raksti

Lietotāji online

Lietotāji online: 93

Reģistrētie lietotāji online: 0

Viesi online: 93

Datuve.lv video
Top.LV

Pulkstena kods Javascript, kuru nerada Internet Explorer 8

Ievietoja: Futre-it @ 2009.07.15 15:44  

Sveiki!

Dizaina pēc savam saitam izdomāju uzlikt pulksteni, paņēmu gatavu scriptu no 1. http://www.rainbow.arch.scriptmania.com/tools/clock  un iepeistoju kodā.

Problēma ir tāda, ka verot vaļā saitu caur Internet explorer 8.0 viņs "nerāda pulksteni, bet uzment paziņojumu (ne kā errro messege, bet augšā,), ka "

"To protect your security , internet explorer restricted this webpage from running scripts or ActiveX controls that could access your computer. Click her for options". Kad paņem options "allow blocked content" pulkstenis parādās

Respktīvi, ko darīt lai pulkstenis rādas pa tiešo,  bez paziņojumu?, kaut kas jāmaina kodā, kurš ir automātiksi ģenerēts, var būt kāds var ietiekt labu HTML pulksteņa scriptu, google jau ir, katram savs "gļuks"

Kādi vispār ir Javascripts pamatprincipi, ko ievērot peistojot kodus?

Paskaidrojums ir šāds pie options:

Why does Internet Explorer restrict active content?

Internet Explorer restricts this content because occasionally these programs can malfunction or give you content you don't want. In some cases, these programs can be used to collect information about you, damage information on your computer, install software without your consent, or allow someone else to control your computer remotely. Given these risks, you should only allow active content if you completely trust the publisher or the website it's coming from.

Pulskteņa kods no http://www.rainbow.arch.scriptmania.com/tools/clock  (varbūt, kāds var iepiestot front page) un pēc apskatīties

<!-- Clock Part 1 - Put Anywhere Before Part 2 -->

<script language="JavaScript">
// Anytime Anywhere Web Page Clock Generator
// Clock Script Generated at
// http://www.rainbow.arch.scriptmania.com/tools/clock

function tS(){ x=new Date(); x.setTime(x.getTime()); return x; }
function lZ(x){ return (x>9)?x:'0'+x; }
function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) }
function dT(){ if(fr==0){ fr=1; document.write('<font size=1 face=Tahoma><b><span id="tP">'+eval(oT)+'</span></b></font>'); } document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); }
var dN=new Array('Svētdiena','Pirmdiena','Otrdiena','Trešdiena','Ceturtdiena','Piektdiena','Sestdiena'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),fr=0,oT="dN[tS().getDay()]+' '+tS().getDate()+' '+mN[tS().getMonth()]+' '+y2(tS().getYear())+' '+':'+':'+' '+lZ(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '";
</script>

<!-- Clock Part 1 - Ends Here  -->

<!-- Clock Part 2 - This Starts/Displays Your Clock -->

<script language="JavaScript">dT();</script>

<!-- Clock Part 2 - Ends Here --> &nbsp; </font></b></li>

Ja būs kāds useful koment paldies

Komentāri:

#1 ob1 @ 2009.07.15 15:51

Nemokies ar to IE savietojamību. Interneta sērfošanai ir paredzēti browseri, nevis IE.

Jā, un nones dubulto postu.

#2 jazi @ 2009.07.15 19:51

Problēma ir tā, ka MicroSoft ir uzlicis, tādu , kā drošības sistēma. Tev būtu, jāmeklē, kā padarīt tavu kodu 'uzticamu'.

P.S. ob1 - EJ DIRST

#3 ob1 @ 2009.07.15 19:57

P.S. jazi - es arī Tevi mīlu. :)