Hello, I have tried to write a code to do this properly many times but continue to fail sometimes it works depending on the forms.
Basically I am looking to right a funtion that is run by any onclick placed in the button input of a form.
what i need it to do is onclick run thi function.
this function will read the form and take the action and ad the name and value of each input to it then display the final action.
this is what i have but cant seem to get it to add the entire thing together.
can anyone please help?
Basically I am looking to right a funtion that is run by any onclick placed in the button input of a form.
what i need it to do is onclick run thi function.
this function will read the form and take the action and ad the name and value of each input to it then display the final action.
this is what i have but cant seem to get it to add the entire thing together.
Code:
onclick=runme(this.form,action)
function runme(formz,actionz) {
AllInputs = formz.getElementsByTagName("input");
urlXX ='url'+actionz+'?';
for (var i=0;i<AllInputs.length;i++) {
InNmVl = AllInputs[i];
AddIt = InNmVl.name + '=' + InNmVl.value + "&";
if (InNmVl.type!="reset") {
var UrlDisp=urlXX+AddIt;
} else {
return;
}
}
}
can anyone please help?