shine Posted July 21, 2008 Report Share Posted July 21, 2008 Lieta taada... ka es beidzot atcereejos... par savu iesaakto modu... vinju var atrast sheit pat forumaa.. searchojot ar shaadiem keywordiem: release live chat So... man ir tads jautaajums(visur izmekleejos.. zinu, ka nemaaku iisti mekleet XD). Es ielieku lapaa bildiiti.. man vaig.. ja kads uz vinjas uziet(nevis uzklikshkjina) ar peli > paraadiitos, kas liidziigs PopUp'am. Nejau kaa windows... bet vienkarshi displayotu lapas viduu citu php failu. Tikko nokjem peli no pogas.. tad tas pazustu. Nu neesmu arii no labakajiem skaidrotaajiem . Megjinaashu to izskaidrot savaadaak. Man ir php fails... index.php Man ir fails > popup.php Popup.php ir image(apaljiigs), kuraa ir sarakstiits teksts. index.php ir image(poga or smth) uz kuras uzejot index.php lapas vidu paraadiitu popup.php, bet nejau windowaa. Varteikt paradiitu apaljo image ar tekstu viduu. Kursors, kas neatrodas uz pogas> Kursors, kas atrodas uz pogas> Minimaali no html/php saprotu... iespeejams, ka tas ir paveicams ar JS..(ljoti iespeejams). Pats to izveidot nevareeshu ... so, ceru, ka vareesiet paliidzeet... paargudriishiem, kuri paziist google tanti > Man nevaig, lai jus vinju iepaziistinaatu ar mani . So ceru uz atsauciibu.. mans 5-6topiks... un 1000+ posti . Link to comment Share on other sites More sharing options...
duplets Posted July 21, 2008 Report Share Posted July 21, 2008 Pirmais, kas ienāca prātā, ļoti primitīvi, bet tev derēs: <img src="http://www.blahblah.lv/poga.jpg" onmouseover="diva_nosaukums.style.display=''" onmouseout="diva_nosaukums.style.display='none'" alt="nemiiz" /> <div id="diva_nosaukums" style="display:none;"> <?php include('popup.php'); ?> </div> Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 22, 2008 Report Share Posted July 22, 2008 es gan dodu priekšroku ajax tooltip , pasērčo googlee ar tie keywordiem. Link to comment Share on other sites More sharing options...
X ID Posted July 22, 2008 Report Share Posted July 22, 2008 (edited) duplets, nebūtu korektāk lietot document.getElementById() ? P.S. RaaapuLis - ajax tooltip dara tieši to pašu, strādā ar onmouseover, onmouseout īventiem. Edited July 22, 2008 by X ID Link to comment Share on other sites More sharing options...
GOMA smile Posted July 22, 2008 Report Share Posted July 22, 2008 (edited) <script type="text/javascript"> function linkTo(y) { var x=window.open("LINKS.php","","scrollbars=yes,width=275,height=200") x.location.hash=y } </script> </head> <body> <h1 align="center"><big><input type="button" value="Podzinna" onclick="linkTo(0)"></big></h1> </body> Cik sapratu tev vaig sito rekur sitas varetu deret nomaini izmerus un links.php Edited July 22, 2008 by GOMA smile Link to comment Share on other sites More sharing options...
X ID Posted July 22, 2008 Report Share Posted July 22, 2008 Neko tu nesaprati un neizskatās, ka būtu centies saprast vai arī tev vnk nav ne jausmas ko tu dari. Beidz spamot. Link to comment Share on other sites More sharing options...
shine Posted July 22, 2008 Author Report Share Posted July 22, 2008 (edited) Hmm.. nu es negribeetu lieki sarezhgjiit visu ar ajax... skatos to pashu var panakt arii vienkarshi ar html/php. Tad nu izmantoju dupleta snippetu. Uztaisu jaunu failu: file.php> <html> <head> <title>lol</title> </head> <body> <img src="img/poga.jpg" onmouseover="diva_nosaukums.style.display=''" onmouseout="diva_nosaukums.style.display='none'" alt="nemiiz" /> <div id="diva_nosaukums" style="display:none;"> <?php include('popup.php'); ?> </div> </body> </html> Ierakstu sho. Viss iet ideaali. popup.php es iebaazu <img...>. So uzejot uz pogas paraadas bildiite. Tur viss ir kartiibaa... tikko es meegjinu to pashu iebaazt index.php... tur kur pilns ar visaadiem kjeburiem... tad neraada... Uztaisiiju papildus style sheet, jo vaig, lai vinjsh kruti staav lapas stuurii(poga). Nelieku css ieksh php, jo man tur diezgan daudz visaadu formateejumu. Ieliku dupleta kodu tieshi zem <body>. Protams saliku attieciigaas lietas kaa image src e.c. Varteikt ieliku to pashu, kas ir example nedaudz augstaak... visu kas ir starp <body> un </body> es ieliku zem index.php <body>... Poga smuki staav stuuriiti.. taa aizdomiigi skataas uz mani... es bailiigi ar kursoru uzeju vinjai virsu... un nekas nenotiek . Kapec? Kodu pieliku attachmentaa :S... Tagad luudzu nebrauciet virsu, ka es esmu kaut ko ar tagiem sajaucis vai ko taadu.. esmu galiigs iesaaceejs weba jomaas . code.zip Edited July 22, 2008 by shine Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 22, 2008 Report Share Posted July 22, 2008 nez nez, man itkā viņš iet, include vietā tekstu pamegin iielikt, tā viņš strādā? Link to comment Share on other sites More sharing options...
shine Posted July 22, 2008 Author Report Share Posted July 22, 2008 (edited) Nee.. izskatas, ka vinjsh nemaz nefikse mouseover... .. Kaartejo reizi buushu kaut ko saputrojis :@.. :S Edited July 22, 2008 by shine Link to comment Share on other sites More sharing options...
X ID Posted July 22, 2008 Report Share Posted July 22, 2008 Īpaši tev es uztaisīju īpašu piemēru http://code.xid.lv/ljs-001-220708/ Link to comment Share on other sites More sharing options...
shine Posted July 22, 2008 Author Report Share Posted July 22, 2008 Liels paldies . Viss chiki niekaa . Liels paldies arii tiem, kas meegjinaaja paliidzeet . Um.. lai netaisiitu jaunu topiku sazin veel kur... Kads lielisks mekleetaajs vai cilveeks, kas parzin js.. vareetu uztaisit ieprieksh dotajam php skriptam, lai refresho tikai PHP dalju? Or iedodiet kaadu labu piemeru/paraugu :S. Link to comment Share on other sites More sharing options...
X ID Posted July 22, 2008 Report Share Posted July 22, 2008 To gan man tagad slinkums rakstīt. Pagūglē pēc ajax tutoriāļa. Par pamatu xmlhttp pieprasījumam var izmantot PrototypeJS vai jQuery. Link to comment Share on other sites More sharing options...
shine Posted July 22, 2008 Author Report Share Posted July 22, 2008 Nekas man nesanaaca XD... as always... izmekleeju visu php.lv.. itka daudzi linki ar visaadiem shitiem.. bet man vai nu negaaja vai arii kaut kaa tur pa maz info.. tur visi attiecas itka tie, kas lasa visu zinaatu .. nu anyway. Paldies par paliidziibu.. jaameegjina kaut kaa izzurbties shim buļsūdam cauri... Maybe kaadam atrastos preciizs links .. kur viss kaa galiigam iesaaceejam ir izskaidrots? :S Link to comment Share on other sites More sharing options...
X ID Posted July 22, 2008 Report Share Posted July 22, 2008 Manuprāt skaidrot var tikai arhitektūru, nevis sintaksi. Es tev iedevu strādājošu piemēru, tiešām, ir tik grūti paņemt un paskatīties sourci un padomāt kas un ko dara? Te nu atkal tev ir divas iespējas: 1) uzticēt kādam to izdarīt tavā vietā, protams, par attiecīgu samaksu 2) sākt skatīties un mācīties pašam (uz šito tu esi gatavs tikai virspusēji, kā redzu) Link to comment Share on other sites More sharing options...
shine Posted July 22, 2008 Author Report Share Posted July 22, 2008 (edited) Nee nejau ar popup.. tas jau man pa 5min sanaaca XD... Es runaaju par refreshu... Edited July 22, 2008 by shine Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 23, 2008 Report Share Posted July 23, 2008 papēti šo tas ir kaut kas līdzīgs, jo viņi arī nerefrešo visu lapu un papēti sourci, palasi, painteresējies Link to comment Share on other sites More sharing options...
X ID Posted July 23, 2008 Report Share Posted July 23, 2008 Tak paskaties to pašu gign.lv vai wuc.lv, kur monitorus refrešo. Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 23, 2008 Report Share Posted July 23, 2008 es jau meginaju dazos pakatities iznjemot to wuc.lv pagaidam nevienam sourcee nevar redzeet tos skriptus Link to comment Share on other sites More sharing options...
X ID Posted July 23, 2008 Report Share Posted July 23, 2008 Skačai Prototype <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript"> window.onload=function(){ window.setTimeout("updatedata()",60000); // Pēc minūtes palaidīs apdeitošanas funkciju } function updatedata(){ // Apdeitošanas funkcija new Ajax.Updater('jauks_divs','jaunā_teksta_fails.php'); // ajax klase no prototype } </script> <div id="jauks_divs"> Teksts. </div> Link to comment Share on other sites More sharing options...
RaaapuLis Posted July 23, 2008 Report Share Posted July 23, 2008 X ID tas refreshos jauko_divu pēc minūtes? Link to comment Share on other sites More sharing options...
wap1337 Posted July 23, 2008 Report Share Posted July 23, 2008 Tur man liekas ir rakstīts // Pēc minūtes palaidīs apdeitošanas funkciju nav vaitad? Link to comment Share on other sites More sharing options...
shine Posted July 23, 2008 Author Report Share Posted July 23, 2008 (edited) Nekas neiet... maybe jataisa php skripts atsevishkjaa failaa? Dog, nu nevaru neko uztaisit.. vispar nekas nesanaak XD. Es lieku divos... iekshaa.. daru visu, kas jadara... nevajadzeeja saakt kaut kaadu modu saistiiba ar webu.. tas visu bremzee... =/. Nu maybe kads var pateikt Kur ir kljuda? Nelieku nevienam tagad visu code sataisit.. pasakat apmeram kur ir kljudinja? CODE: <!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); } function updatedata(){ new Ajax.Updater('refresher','index.php'); } function $(eid){ return document.getElementById(eid); } 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;"><?php include('popup.php'); ?></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"> <?php $dbvards = 'localhost'; $dblietotajs = 'root'; $dbparole = 'parole'; $dbnosaukums = 'db'; $defaultimage = 'img/maps/noimage.jpg'; $conn = mysql_connect($dbvards, $dblietotajs, $dbparole) or die ('Nevar pieslegties!'); mysql_select_db($dbnosaukums) or die('Nevar tikt pie db!'); $query = 'SELECT * FROM chats ORDER BY rownum DESC LIMIT 5'; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "<b>"; echo "{$row['lastentry1']}"; echo "</b>"; echo "<br>"; } echo "</div>"; echo "<div id='winmsg' align='center'>"; $query2 = 'SELECT winmsg FROM wins'; $result2 = mysql_query($query2) or die('Query failed: ' . mysql_error()); while($row2 = mysql_fetch_array($result2, MYSQL_ASSOC)) { echo "<b>"; echo "{$row2['winmsg']}"; echo "</b>"; } echo "</div>"; $query3 = 'SELECT * FROM mapname'; $result3 = mysql_query($query3) or die('Query failed: ' . mysql_error()); while($map = mysql_fetch_array($result3, MYSQL_ASSOC)) { echo "<div id='map'>"; echo "<b><font size='2' color='#ffb000'>{$map['name']}</font></b>"; echo "</div>"; if(file_exists("img/maps/{$map['name']}.jpg")) { echo "<style type='text/css'>"; echo "body {"; echo "background: url(/img/maps/{$map['name']}.jpg) no-repeat;"; echo "background-attachment:fixed;"; echo "background-position: 0px 0px;"; echo "}"; echo "</style>"; } else { echo "<style type='text/css'>"; echo "body {"; echo "background: url($defaultimage) no-repeat;"; echo "background-attachment:fixed;"; echo "background-position: 0px 0px;"; echo "}"; echo "</style>"; } $query4 = 'SELECT * FROM wins'; $result4 = mysql_query($query4) or die('Query failed: ' . mysql_error()); while($wins = mysql_fetch_array($result4, MYSQL_ASSOC)) { echo "<div id='ct'>"; echo "<b><font size='2' color='#ffb000'>{$wins['ct']}</font></b>"; echo "</div>"; echo "<div id='ts'>"; echo "<b><font size='2' color='#ffb000'>{$wins['ts']}</font></b>"; echo "</div>"; } $query5 = 'SELECT * FROM roundtime'; $result5 = mysql_query($query5) or die('Query failed: ' . mysql_error()); while($rtime = mysql_fetch_array($result5, MYSQL_ASSOC)) { echo "<div id='roundtime'>"; echo "<b><font size='2' color='#ffb000'>{$rtime['time']}</font></b>"; echo "</div>"; } } mysql_free_result($result); mysql_close($conn); ?> </div> </body> </html> Paldies par paliidziibu.. sapratiishu, ja pa daudz prasi =/. Edited July 23, 2008 by shine Link to comment Share on other sites More sharing options...
*jancis38* Posted July 23, 2008 Report Share Posted July 23, 2008 Tu to prototeipu novilki? Link to comment Share on other sites More sharing options...
shine Posted July 23, 2008 Author Report Share Posted July 23, 2008 (edited) Jaa un ieliku taja pashaa mape kur shis php fails.. EDIT: Aizmirsu piebilst.. new Ajax.Updater('refresher','chuu.php'); Bija testiem.. vai savaadak iet.. tapec pagaidam vinjsh ir: new Ajax.Updater('refresher','index.php'); Iisti nesaprotu kapec vaig kaadu php tur.. man vaig, lai php dalju refresho tajaa pashaa failaa. :S Edited July 23, 2008 by shine Link to comment Share on other sites More sharing options...
*jancis38* Posted July 23, 2008 Report Share Posted July 23, 2008 Nu tad izmanto: PHP <meta http-equiv="refresh" content="60"/> 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