Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript] Problem z innerHTML
erjot90
post
Post #1





Grupa: Zarejestrowani
Postów: 53
Pomógł: 0
Dołączył: 19.06.2009
Skąd: Piotrków Tryb

Ostrzeżenie: (0%)
-----


Witam,

Sprawdzając czy moja strona działa we wszystkich przeglądarkach napotkałem się na błąd
chodzi dokładnie o takie coś:
  1. <script language="javascript">
  2. document.getElementById('czas').innerHTML = 'adasdas';
  3. <span id="czas"></span>

W Firefox działa git ale w IE nie (IMG:style_emoticons/default/sad.gif) nie wiem czemu (IMG:style_emoticons/default/sad.gif) pomocy! (IMG:style_emoticons/default/smile.gif)

Ten post edytował erjot90 27.08.2009, 22:41:17
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Kszyhuu
post
Post #2





Grupa: Zarejestrowani
Postów: 157
Pomógł: 32
Dołączył: 24.08.2009

Ostrzeżenie: (0%)
-----


IE ogólnie ssie. Walnij coś w stylu:
<!--[if lt IE 8]><link href=DOMENAl/css/infobar.css rel=stylesheet>
<div id=infobar><a href=http://browsehappy.pl/>
Uwaga: Internet Explorer nie jest w stanie poprawnie wyświetlić tej strony. Kliknij aby rozwiązać problem...
</a></div><div id=viewplot><script src=DOMENA/js/infobar.js></script><![endif]-->

CSS:
CODE
@media screen{
#viewplot{
padding:0; /* << Tutaj ustaw margines jak dla <body> */
width:100%;
height:95%;
overflow:auto;
height:expression(this.parentNode.offsetHeight-this.offsetTop);
position:relative
}
html{
border-top:0;
border-left:0;
border-bottom:0;
overflow:hidden
}
body{
margin:0;
padding:0;
overflow:hidden;
height:100%
}
#infobar{
width:100%;
font:normal 8pt/1 "MS Sans Serif"
}
#infobar a{
display:block;
font:message-box;
height:1%;
color:white;
background:red url(OBRAZEK) no-repeat fixed .33em .2em;
padding:.45em .3em .45em 2.3em;
border-bottom:.16em outset;
text-align:left;
text-decoration:none;
cursor:default
}
#infobar a{
font-size:8pt;
letter-spacing:0
}
#infobar a:hover{
color:HighlightText;
background-color:Highlight
}
}
#infobar b{
position:absolute;
right:5px;
top:3px;
font-size:11px;
font-family:webdings;
cursor:hand
}
@media print{
#infobar{
display:none
}
}


JS:
CODE

(function(){if (Math.random()*10>(infobar.s||10))infobar.style.display='none';var I=infobar.runtimeStyle,V=viewplot.runtimeStyle;I.top=infobar.offsetHeight*-1;I.left=V.top=V.left=0;V.position=I.position="absolute";var T=setInterval(function(){var N=parseInt(infobar.currentStyle.top),M=-N;if(M>0){M=M>5?5:M;I.top=N+M;V.top=parseInt(V.top)+M}else{clearInterval(T);I.position=V.positio
n="";V.top='0'}},40);infobar.innerHTML='<b onclick="infobar.style.display=\'none\';viewplot.height=\'100%\'">r</b>'+infobar.innerHTML;infobar.onclick=function(){infobar.all.tags("a")[0].innerHTML='Trwa otwieranie strony informacyjnej...'}})()

Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.10.2025 - 23:09