17/04/2013, 22:05
|
| | | Fecha de Ingreso: septiembre-2008 Ubicación: Cd. Victoria Tam
Mensajes: 162
Antigüedad: 16 años, 4 meses Puntos: 2 | |
Respuesta: como ejecutar una función de php en js gracias por los consejos encontré esta función por $_GET
var xmlhttp;
function ajax(datos, ruta)
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("mostrar").innerHTML=xmlht tp.responseText;
}
}
xmlhttp.open("GET",ruta+datos,true);
xmlhttp.send();
}
function eliminarDatos(id){
datos="id="+id;
ajax(datos,"ins_seg.php?");
ocultar('del' + id);
}
function ocultar(id){
document.getElementById(id).style.display="none";
}
function mostrar(id){
document.getElementById(id).style.display="block";
}
__________________ La ignorancia es una bendición o un privilegio, yo lo siento programadores |