tiy Posted December 8, 2005 Report Share Posted December 8, 2005 (edited) Vai to var ar php html un css izdarit datu fichu ir bildes (piem.Suns Kakis) Ar peli uzbrauc uz bildes, kur ir suns un text arena blakus paradas apraksts par suni. ============== ----------------------------------------- =_______________= =_______________= =Suna bilde______ = _________Text_____________ = _______________= = _______________= ============== -------------------------------------------- kad pele nav neuzkadas bildes neko neizvada varbut var ari bez php es nezinu tapec jau jautaju, es 100% zinu ka to var izdarit ar JS, bet JS daudziem useriem medz but islegts, ko tad? Edited December 8, 2005 by tiy Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 8, 2005 Report Share Posted December 8, 2005 tiy--> PHP ar to nav nekaada sakara visu lietotaaja/brauzera darbiibu kontrolei ir DHTML un JS IMPHO bez JS te neiztikt.... Link to comment Share on other sites More sharing options...
tiy Posted December 8, 2005 Author Report Share Posted December 8, 2005 (edited) Bet ja uzraksta php veida ar html formu, un bilde ir ka poga un, kad ta ir nospiesta subit aizsuta uz php scriptu id=suns datu baze iesercho suns="suns dzivnieks ar chetram kajam ....",tad aizuta uz text arenu sho rindu, ta var izdarit. Edited December 8, 2005 by tiy Link to comment Share on other sites More sharing options...
ohmygod Posted December 8, 2005 Report Share Posted December 8, 2005 Ja gribi, uzejot uz bildes pārlādēja svisa lapa - ta ja - to var izdarīt. Ja jāparādās tikai uzrakstam vienam pašam - tad ar pliku PHP/HTML galā netiksi... PHP neizpildās apskates laikā! Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 8, 2005 Report Share Posted December 8, 2005 tiy--> cit: Ar peli uzbrauc uz bildes, //un bilde ir ka poga un, kad ta ir nospiesta /cit: Noformulee savu jautaajumu preciizaak PHP izpildaas tikai uz servera ! ja taa bilde ir kaa links, tad var iztikt ar tiiru HTML ja kaa poga tad bez JS nekaadi... Link to comment Share on other sites More sharing options...
v3rb0 Posted December 8, 2005 Report Share Posted December 8, 2005 ja kā poga - liekam submit un katra sunja bildei pa formai un var kaut kaa bez js. bet nesaku ka tas eleganti un pareizi :) Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 8, 2005 Report Share Posted December 8, 2005 v3rb0--> nu jaa taisniiba var jau arii taa.... vienk. galiigi nesaprotu cilveeks grib lapu ar visadiem dinamiskiem elementiem un negrib izmantot JS... Link to comment Share on other sites More sharing options...
tiy Posted December 8, 2005 Author Report Share Posted December 8, 2005 Ta ir bilde, bet nav linka. Kads tad var palidzet ar JS to dabut gatavu. Bet shitais it ka strada, bet vinsh to izvadishanu veic cita lapa, es gribu, lai vina notiek ta ja pasha lapple un kaut vai ieksh table. <script type="text/javascript"> function izvada_datus(id) { if (id==1){ document.write("Suns")} if (id==2){ document.write("Kakis")} } </script> <form> <input type="image" src="xxx.jpg" onclick="izvada_datus(1)"> </form> Link to comment Share on other sites More sharing options...
v3rb0 Posted December 8, 2005 Report Share Posted December 8, 2005 palasies par document.getElementById(); document.createElement(); document.createTextNode(); appendChild(); un vispār par DOM a pēc tam saliec kā vajag pac. noderēs arī citur. Link to comment Share on other sites More sharing options...
[Ya] Posted December 8, 2005 Report Share Posted December 8, 2005 (edited) HTML: <html> <head></head> <body> <script type='text/javascript'> var text=new Array(); text['xxx']="teksts teksts teksts teksts teksts teksts teksts teksts teksts teksts teksts teksts"; text['yyy']="kautkāds teksts kautkāds teksts kautkāds teksts kautkāds teksts kautkāds teksts"; text['zzz']="parasts teksts parasts teksts parasts teksts parasts teksts parasts teksts parasts teksts"; function showtext(what) { document.getElementById(what).innerHTML=text[what]; } function hidetext(what) { document.getElementById(what).innerHTML=""; } </script> <table border='1'> <tr><td><img src='xxx.jpg' onmouseover="showtext('xxx')" style='width:10px;height:10px;' onmouseout="hidetext('xxx')"/></td><td style='valign:top;' id='xxx'></td></tr> <tr><td><img src='yyy.jpg' onmouseover="showtext('yyy')" style='width:10px;height:10px;' onmouseout="hidetext('yyy')"/></td><td style='valign:top;' id='yyy'></td></tr> <tr><td><img src='zzz.jpg' onmouseover="showtext('zzz')" style='width:10px;height:10px;' onmouseout="hidetext('zzz')"/></td><td style='valign:top;' id='zzz'></td></tr> </body> </html> ejoš piemers Edited December 8, 2005 by [Ya] Link to comment Share on other sites More sharing options...
v3rb0 Posted December 8, 2005 Report Share Posted December 8, 2005 (edited) (neko, izlaboc) Edited December 8, 2005 by v3rb0 Link to comment Share on other sites More sharing options...
hmnc Posted December 8, 2005 Report Share Posted December 8, 2005 innerHTML uz <img> :D muahahaha! tu vēl flašā uztaisi teksta redaktoru :D Link to comment Share on other sites More sharing options...
php_Stopp Posted December 8, 2005 Report Share Posted December 8, 2005 (edited) <html> <body> <table width="100%" cellpadding="10" border="0"> <td width="50%"><img src="suns.jpg" onMouseOver="document.getElementById('sunsapraksts').style.display='block';" onMouseOut="document.getElementById('sunsapraksts').style.display='none';"/><br/> <img src="kakis.jpg" onMouseOver="document.getElementById('kakisapraksts').style.display='block';" onMouseOut="document.getElementById('kakisapraksts').style.display='none';"/><br/> </td><td width="50%"><div id="sunsapraksts" style="display: none;">suns ir brūns</div> <div id="kakisapraksts" style="display: none;">kaķis it smirdīgs</div> </td></table> </body> </html> kaut kam tādam vajadzētu iet.. Edited December 8, 2005 by php_Stopp Link to comment Share on other sites More sharing options...
v3rb0 Posted December 8, 2005 Report Share Posted December 8, 2005 paslēpt textu vajag tad kad uzbrauc ar peli uz citas bildes, jo daudzi cilvēki lasa textu velkot līdzi ar peli. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted December 8, 2005 Report Share Posted December 8, 2005 (edited) ja tikai 2 elementi tad to tachu var arii visu izsariit ar: --------- document.getElementById("id1").style.display = "block"; document.getElementById("id2").style.display = "none"; --------- protams jaustaisa pietiekami normaala f-ja utt... --- ja vairaak tad sakumaa visi elementi (no masiva) none un vajadziigais block pele nost -> visi none edit: php_Stopp pasteidzaas... Edited December 8, 2005 by Grey_Wolf Link to comment Share on other sites More sharing options...
Recommended Posts