|
(X)HTML, JavaScript, DHTML, XML, CSS Client scripting tehnologije, Dynamic HTML, Cascading Stylesheets, XML i standardi |
|
Alati teme | Način prikaza |
|
01. 02. 2014. | #1 |
profesionalac
Professional
Datum učlanjenja: 25.10.2012
Poruke: 278
Hvala: 16
32 "Hvala" u 9 poruka
|
Update podataka u mysql bazi (ajax, jquery)
Potreban mi je alat za vizuelizaciju podataka pa sam odlucio da koristim google viz API...
Napravio sa neki dashboard: http://agrotime.roadvoyage.com/index1.html Gde vucem podatke iz baze (sa php,ajax,json) i dodajem podatke u bazi. Ono sto sledi da uradim jeste UPDATE podataka i DELETE podataka: Najpre napravio sam modal window: Kôd:
<!-- Button trigger modal --> <button class="btn btn-success" data-toggle="modal" data-target="#myModal"> Add new</button> <button class="btn btn-info" data-toggle="modal1" data-target="#myModal"> Edit row</button> <div id="output"></div> <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">EDIT row</h4> </div> <div class="modal-body"> ...... <div class="input-group"> <span class="input-group-addon">Ime</span> <input type="text" id="name" class="form-control" placeholder="Upisi ime"> </div> </br> <div class="input-group"> <span class="input-group-addon">Pol</span> <input type="text" id="gender" class="form-control" placeholder="Pol (male/female)"> </div> </br> <div class="input-group"> <span class="input-group-addon">Godine</span> <input type="text" id="age" class="form-control" placeholder="Godine starosti"> </div> </br> <div class="input-group"> <span class="input-group-addon">Broj pojedenih krofni</span> <input type="text" id="donuts_eaten" class="form-control" placeholder="Pojedene krofne"> </div> </br> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button id="newData" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Add new data</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> Ima li neko ideju kako ovo ide? Mozda na neki drugi nacin? Kako je najbolje? |
|
|