Salve a tutti! sono nuovo del forum
spero mi possiate aiutare
in pratica devo fare l'inserimento di 2 valori in un db mysql e volevo utilizzare ajax
ho 2 pagine , 1 con il form e lo script java e 1 con il codice php.
il problema è ( si è stupidisso ma di javascript sono veramente niubbo) che non riesco a passare due valori , ma solo uno ( si in pratica non so come finire il codice)
<script language="Javascript">
function xmlhttpPost(strURL) {
var xmlHttpReq = false;
var self = this;
// Xhr per Mozilla/Safari/Ie7
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// per tutte le altre versioni di IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
updatepage(self.xmlHttpReq.responseText);
}
}
self.xmlHttpReq.send(getquerystring());
}

function getquerystring() {
var form = document.forms['fd'];
qstr = form.nick.value
return qstr;
}

function updatepage(str){
document.getElementById("result").innerHTML = str;
}
</script>
il problema sta in queste righe:
function getquerystring() {
var form = document.forms['fd'];
qstr = form.nick.value
return qstr;
}
in pratica cosi funziona ma passa solo un valore del form (appunto nick) ma io ne dovrei passare 2 ma non so esattamente come modificare il codice ho provato in vari modi ma niente

mi potete aiutare?

Grazie mille in anticipo