Witam ponownie.
Od razu mówię o co chodzi.
<!DOCTYPE html>
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","test_csmg.php?model=GT540",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
var x=xmlDoc.getElementsByTagName("*");
document.write("
<table border='1'>");
for (i=0;i<x.length;i++)
{
document.write("<tr><td>");
document.write(x[0].getElementsByTagName("model")[i].childNodes[0].nodeValue);
document.write("
</td><td>");
document.write(x[0].getElementsByTagName("suffix")[i].childNodes[0].nodeValue);
document.write("
</td><td>");
document.write(x[0].getElementsByTagName("approve_date")[i].childNodes[0].nodeValue);
document.write("
</td><td>");
document.write(x[0].getElementsByTagName("sw_version")[i].childNodes[0].nodeValue);
document.write("_");
document.write(x[0].getElementsByTagName("cond_version")[i].childNodes[0].nodeValue);
document.write("
</td><td><a href="); document.write(x[0].getElementsByTagName("sw_url")[i].childNodes[0].nodeValue);
document.write(">Download
</a></td></tr>");
}
document.write("
</table>");
ten kod robi tabele html z pliku xml.
Chodzi mi o to żeby przez wczytaniem tabeli można było wybrać model poprzez wpisanie go ręcznie w textboxie i kliknięcie w przycisk OK.
Potem trzeba jakoś "wziąć" ten model z textboxu i wpakować go w miejsce test_csmg.php?model=[TUTAJ] i na końcu zrobić skrypt.