(X)HTML, JavaScript, DHTML, XML, CSS Client scripting tehnologije, Dynamic HTML, Cascading Stylesheets, XML i standardi |
|
Alati teme | Način prikaza |
25. 04. 2006. | #10 | |
Ivan Dilber
Sir Write-a-Lot
|
Citat:
mana je sto ne podrzava IE5, i vecina ovih stvari moze da se uradi custom (verovatno i bolje), ali prednost biblioteke je sto ima brdo stvari vec odradjeno, pa ti stedi vreme.. Sto da pravis html_escape/ unescape funkciju kad vec ima, sto da pravis funciju za dohvatanje elemanat forme kad mozes da otkucas $F('ime_elementa') i dobijes value bez obzira da li je select ili input u pitanju... A funkcionalan ajax primer izgleda ovako: HTML kôd:
<html> <head> <script type="text/javascript" src="prototype.js"></script> <script type="text/javascript"> function init(){ $('greeting-submit').style.display = 'none'; Event.observe('greeting-name', 'keyup', greet, false); } function greet(){ var url = 'ajax_proba.php'; var pars = 'greeting-name='+escape($F('greeting-name')); var target = 'greeting'; var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars}); } Event.observe(window, 'load', init, false); </script> </head> <body> <form method="get" action="ajax_proba.php" id="greeting-form"> <div> <label for="greeting-name">Enter your name:</label> <input id="greeting-name" type="text" /> <input id="greeting-submit" type="submit" value="Greet me!" /> </div> <div id="greeting"></div> </form> </body> </html> PHP kôd:
__________________
Leadership is the art of getting people to want to do what you know must be done. Poslednja izmena od ivanhoe : 25. 04. 2006. u 18:29. |
|
|
|
Slične teme | ||||
Tema | Početna poruka teme | Forum | Odgovori | Poslednja poruka |
Prototype, generisanje elemenata forme i Firefox | shoba | (X)HTML, JavaScript, DHTML, XML, CSS | 3 | 03. 05. 2009. 00:44 |
preporuka za knjigu, js/prototype za pocetnike? | [nq] | Opušteno | 2 | 08. 09. 2008. 03:35 |
Globalna promenljiva uz prototype framework | LiquidBrain | (X)HTML, JavaScript, DHTML, XML, CSS | 7 | 23. 08. 2007. 15:24 |
XPath, Firefox i Prototype | kodi | (X)HTML, JavaScript, DHTML, XML, CSS | 3 | 20. 02. 2007. 12:08 |
Dobar DMS? | Bojan Zivanovic | Web aplikacije, web servisi i software | 0 | 03. 11. 2005. 02:19 |