Featured post
php - Add strings with ajax from server using phpMyAdmin, jquery -
right now, i'm trying add couple of <li>
, using ajax. problem i'd these <li>
use data database have on server. i'd know how that! also, possible use jquery?
let's have <div id="listholder">
, have <ul>
, <li>
. <li>
ones want change via ajax. use phpmyadmin, have database called t_menumaterials, , want retrieve strings inside m_nom. i'd want able change menu, on click of button, change t_menumaterials t_menutextures. have been able populate menu, @ load of page that!
$requetemenumaterials = "select * t_menumaterials order m_id limit 10"; $ressourcesliste = mysql_query($requetemenumaterials); $targetmenu = "select r_categorie t_ressources order m_id limit 10"; $ressourcesliste2 = mysql_query($targetmenu); $menu2 =''; while($tbl_ressources1 = mysql_fetch_assoc($ressourcesliste)){ $menu2 .='<li class="secondarymenu"><a href="#" onclick="test('.$ressourcesliste2.');" ><div>'.$tbl_ressources1['m_nom'].'</div></a></li>'; }
now, i'd able change div (like if $requetemenumaterials became ="select * t_menutextures(instead of t_menumaterials). have no idea on how change <li>
via ajax using databases , phpmyadmin.
its difficult give exact advice list small parts of service side code.
but general guildlines:
take on jquery, has support ajax calls , lot of client side plumbing update elements.
on server have have som separation of different calls db client via url or post data can tell service side script do.
there no way javascript directly call inner part of php page, have call page regular http request , use url arguments or postdata have page return different information.
- Get link
- X
- Other Apps
Comments
Post a Comment