Results 1 to 3 of 3
Thread: Ajax
Hybrid View
-
10th March 2008 16:10 #1
-
10th March 2008 17:27 #2
. jax. JavaScript, XMLHttpRequest XMLHTTP .
:
, , . . .Code:function getRequestObject(){ var req; try{ req=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e){ try{ req=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2){ req=null; } } if(!req && typeof XMLHttpRequest != "undefined") req = new XMLHttpRequest(); return req; } function get_data(lnk,item_id){ var id = lnk.id; var first_index = id.indexOf('#'); var last_index = id.lastIndexOf('#'); var field = id.substring(first_index+1,last_index); var table = id.substring(last_index+1); var req = null; req = getRequest(); if( req != null){ req.open("GET","xml_request.php?table="+table+"&field="+field+((item_id)?('&item_id='+item_id):''),false); req.setRequestHeader("Content-Type","text/plain"); req.send(''); var tgt = document.getElementById('span#'+field+'#'+table); tgt.innerHTML = req.responseText; } else alert("Cannot load data"); }
, - onchange onblur, , .Last edited by Bombera; 10th March 2008 at 17:37.
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
10th March 2008 21:09 #3




Reply With Quote

7th May 2023, 16:02 in PC