Cita:
podrian por favor ayudarme a unirlo en un solo funtion o cual seria la solucion <SCRIPT LANGUAGE=JavaScript>
window.onload = function get_xmlhttp() {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp
}
window.onload = function probar_XMLHttpRequest(merchId,storeId,termId,currI d) {
xmlhttp=get_xmlhttp()
var monto = document.getElementById("monto").value;
var order = document.getElementById("order").value;
xmlhttp.open("GET", "calculo.php?monto="+monto"&merchId="+merchId,fals e);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4)
var serverResponse = xmlhttp.responseText;
document.getElementById("vdig").innerHTML=serverRe sponse;
document.getElementById("digest").value=serverResp onse;
};
xmlhttp.send(null);
}
</SCRIPT>
window.onload = function get_xmlhttp() {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp
}
window.onload = function probar_XMLHttpRequest(merchId,storeId,termId,currI d) {
xmlhttp=get_xmlhttp()
var monto = document.getElementById("monto").value;
var order = document.getElementById("order").value;
xmlhttp.open("GET", "calculo.php?monto="+monto"&merchId="+merchId,fals e);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4)
var serverResponse = xmlhttp.responseText;
document.getElementById("vdig").innerHTML=serverRe sponse;
document.getElementById("digest").value=serverResp onse;
};
xmlhttp.send(null);
}
</SCRIPT>