shine Posted July 23, 2008 Author Report Share Posted July 23, 2008 Omfg... es jau esmu teicis, ka negribu izmantot meta refresh =/.. btw.. koda augsha ieskaties... kas tur ir nokomentets.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Counter-Strike Live Chat by Sh!nE*</title> <!--<meta http-equiv="refresh" content="1"/>--> <link rel="stylesheet" type="text/css" href="style/style.css" media="screen"> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript"> window.onload=function(){ window.setTimeout("updatedata()",1000); } Labi.. pienjemsim ir liels plash webs, kur ir tiesham daudz ko ielaadeet.. un, ja sho modu ieliek tur.. tachu neizskatiisies smuki . =/.. so... Link to comment Share on other sites More sharing options...
X ID Posted July 23, 2008 Report Share Posted July 23, 2008 1) izskatās, ka līks html`s, parādi uzģenerēto kodu. 2) šobrīd, ja viss strādātu, tad tu tajā div`ā vēlreiz ieliktu visu pirmo lapu. 3) lieto setInterval(), lai apdeitotu ik pa 1min, nevis 1x pēc 1min. 4) novāc funkciju "$", jo iekš prototype tāda jau ir. Link to comment Share on other sites More sharing options...
shine Posted July 23, 2008 Author Report Share Posted July 23, 2008 (edited) 1) O.o? Kodu? Ar tagiem nekad neesmu pratis riikoties . 2) O.o? Esmu meegjinaajis uzlikt, lai ielaade citu php, kura iekopeeju visu lapu.. bet domaaju tas nebija vajadziigs... Pirmstam meegjinaaju iznjemt to saturu, kas atradas divaa.. un iekope cita lapaa(protams ar pamata tagiem e.c)... tad atstaat divu tukshu... 3) +/- dariits 4) Iznjemot aara.. neiet.. nomainot funckijas nosaukumu... neiet... So, kas man iisti jaadara.. maybe prototype neielaadeejas or maybe tada funckija tur nav ? Darot jeb ko ar to funkciju man vairs popupu neraada :S. Izteelojies... ka es pilniigi neko nejeedzu... Pilniigi Neko, un tagad luudzu visu izskaidro, lai es vareetu saprast? Paarsvara pec maajieniem pats visu atkozhu... bet nu... shii nav taa reize.. saprotu.. ka paziisti php/html/js/ajax un visus pareejos web zveerus... bet man no web saprashanas nav. Nu es nezinu, ko dariit... kads paskaidro man kaa mazam beernam =/. Zinu esmu iipashi apdaavinaats cilveeks ar kuram vaig visu ljoti siiki izskaidrot citaadi vinjam Nekas neaizies... Paldies, ka vismaz kaut kaa censhaas paliidzet.. Edited July 23, 2008 by shine Link to comment Share on other sites More sharing options...
X ID Posted July 24, 2008 Report Share Posted July 24, 2008 ? Darot jeb ko ar to funkciju man vairs popupu neraada :S. Lūk arī atbilde. Iekš prototype $() ir 100 punkti, ja tu aizvāc paštaisīto $() un vairs nekas neiet, značit prototype netiek ielādēts. Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 24, 2008 Report Share Posted July 24, 2008 iepriekš teicu ka ieliec prototype failu vienā mapē kur php fails, bet tu to prototype failu inklūdoji php failā? <script type="text/javascript" src="prototype.js"></script> Link to comment Share on other sites More sharing options...
shine Posted July 24, 2008 Author Report Share Posted July 24, 2008 How can i fix it? man prototype.js ir ieksh www mapes.. kura arii ir index.php... <script type="text/javascript" src="prototype.js"></script> Maybe prototype kaut kads.. neiistais? Jo itka nokachaaju jaunaako.. maybe kads iedod savu.. ja kadam lieki meetaajas.. vai paskataas code.. maybe tur ir kaut kur vaina.. Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 24, 2008 Report Share Posted July 24, 2008 nu es tev prasīju, tu vinju ieliki index.php failā, to <script type... ??? Mans prototype fails - http://paste.php.lv/7703?lang=javascript Link to comment Share on other sites More sharing options...
shine Posted July 24, 2008 Author Report Share Posted July 24, 2008 Ok.. tagad nonjemot $ funkciju iet... bet luuk refresh.. nee CODE Link to comment Share on other sites More sharing options...
X ID Posted July 24, 2008 Report Share Posted July 24, 2008 Debug`o kodu. Pārtaisi updatedata() funkciju šādi: function updatedata(){ alert('start'); new Ajax.Request('index.php',{onSuccess:function(e){alert(e.responseText);}}); alert('end'); } Ja neizleks lodziņš ar tekstu "start", tad problēmas ar funkcijas izsaukšanu. Ja neizleks lodziņš ar tekstu "end", tad problēmas ar prototype. Pēc idejas jāizlec 3 alertiem. Otrajā jābūt jaunajam div`a saturam. P.S. Es tev neteicu, lai datus, kuri tiks apdeitot`i, liec atsevišķā failā? Link to comment Share on other sites More sharing options...
shine Posted July 24, 2008 Author Report Share Posted July 24, 2008 Pff.. karoch... why da fuck vinjsh vispar to funckiju neizsauc? Vienkarshi tur viss izskatas.., taja kodaa, tik.. tik nu.. pareizi? window.onload=function(){ window.setInterval("updatedata()",1000); } function updatedata(){ alert('start'); new Ajax.Request('index.php',{onSuccess:function(e){alert(e.responseText);}}); alert('end'); } Ar setTimeout arii meegjinaaju... Link to comment Share on other sites More sharing options...
X ID Posted July 24, 2008 Report Share Posted July 24, 2008 Ja godīgi, pat īsti neredzu kļūdas. Pieļauju, ka vaina varētu būs līkā html kodā. Jau kautkad iepriekš prasiju, lai iekopē ģenerēto kodu te. Link to comment Share on other sites More sharing options...
shine Posted July 24, 2008 Author Report Share Posted July 24, 2008 CODE Ar kodu sapratu .php failu . Nu nez.. ceru, ka tu to domaa... tur ir links. :S Link to comment Share on other sites More sharing options...
X ID Posted July 25, 2008 Report Share Posted July 25, 2008 Uzliec šito failu (ko devi man) uz servera. Tad dodies uz attiecīgo lapu un nokopē sourci un iemet to te. Es tak teicu uzģenerēto kodu. Link to comment Share on other sites More sharing options...
shine Posted July 25, 2008 Author Report Share Posted July 25, 2008 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Counter-Strike Live Chat by Sh!nE*</title> <!--<meta http-equiv="refresh" content="1"/>--> <link rel="stylesheet" type="text/css" href="style/style.css" media="screen"> <script type="text/javascript" src="prototype.js"> window.onload=function(){ window.setInterval("updatedata()",1000); } function updatedata(){ alert('start'); new Ajax.Request('index.php',{onSuccess:function(e){alert(e.responseText);}}); alert('end'); } function show(){ $('popup').style.display='block'; } function hide(){ $('popup').style.display='none'; } window.onload=function(){ var button = $('button'); button.onclick=function(){ return false; } button.onmouseover=function(){ show(); } button.onmouseout=function(){ hide(); } } </script> </head> <body> <div id="scoreboard"> <a id="button" href="#popup"><img src="img/poga.jpg"></a> </div> <div id="popup" style="display:none;"><html> <img src="img/popup.jpg"> lol </html></div> <div id="credit"> <img src="img/credit.gif"> </div> <div id="upbar"> <img src="img/up_bar.png"> </div> <div id="refresher"> <div id="chat"> <b><font color="#efae00">Map has been changed to: </font><font color="green">de_aztec</font><font color="#efae00">. Live Chat by </font><font color="green">Sh!nE*</font><font color="#efae00">.</</b><br></div><div id='winmsg' align='center'><b></b></div><div id='map'><b><font size='2' color='#ffb000'>de_aztec</font></b></div><style type='text/css'>body {background: url(/img/maps/de_aztec.jpg) no-repeat;background-attachment:fixed;background-position: 0px 0px;}</style><div id='ct'><b><font size='2' color='#ffb000'>0</font></b></div><div id='ts'><b><font size='2' color='#ffb000'>2</font></b></div><div id='roundtime'><b><font size='2' color='#ffb000'>03:00</font></b></div></div> </body> </html> Link to comment Share on other sites More sharing options...
X ID Posted July 25, 2008 Report Share Posted July 25, 2008 <script type="text/javascript" src="prototype.js">...</script> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript">...</script> Doma skaidra? Link to comment Share on other sites More sharing options...
shine Posted July 25, 2008 Author Report Share Posted July 25, 2008 Jaa bet tik un taa neiet... neviens lodzinjsh neizlec... Link to comment Share on other sites More sharing options...
X ID Posted July 25, 2008 Report Share Posted July 25, 2008 Baigi tizli šitādā veidā mēģināt labot kodu Krč, pirmkārt saved kārtībā html. Varētu būt, ka nenostrādā onload īvents? Ieliec iekš <skript> taga vnk <script type="text/javascript"> updatedata(); ... </script> Link to comment Share on other sites More sharing options...
shine Posted July 25, 2008 Author Report Share Posted July 25, 2008 (edited) Labi.. atradu vienu kljuudu popup.php.. tur tachu nekaadus html tagus nebija jaaliek.. izlaboju labi... bet taapat nekas neiet.. neviens alerts neizlec.. mainu ko gribu.. sekoju taviem ieteikumiem.. tapat nekas nemainaas.. tur kaut, kas Tiesham nav kaa vaig :S. Izlaboju array size pluginaa.. jo vinjhs bija par mazu.. delj mapname lielumiem vinjhs nogriezh beigas... so palielinaaju vinju. Tagad html izskatas bez kljuudaam... visi tagi ir kaa vaig... what can be wrong ? EDIT: šeit pats vari apskatiities.., lai visu laiku nav jaaprasa source e.c. Thanks. Edited July 25, 2008 by shine Link to comment Share on other sites More sharing options...
X ID Posted July 25, 2008 Report Share Posted July 25, 2008 Da nu loģiski Pirms tam kkā nepamaniju, bet tu saproti, ka pats ieseto citu onload funckiju? <script type="text/javascript"> window.onload=function(){ window.setInterval("updatedata()",1000); } ... window.onload=function(){ var button = $('button'); button.onclick=function(){ return false; } button.onmouseover=function(){ show(); } button.onmouseout=function(){ hide(); } } </script> Mēģini tā: <script type="text/javascript"> window.onload=function(){ window.setInterval("updatedata()",1000); var button = $('button'); button.onclick=function(){ return false; } button.onmouseover=function(){ show(); } button.onmouseout=function(){ hide(); } } ... </script> Link to comment Share on other sites More sharing options...
shine Posted July 25, 2008 Author Report Share Posted July 25, 2008 Liels paldies . Viss iet. Mods tuvaakaja laika bus pabeigts... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now