I have a function that takes a base url and appends values dynamically from a form.However, the success alert box is not displayed.. What's wrong with these codes and How to sort this?
Code:
function validateEncode(url,frm,id){
alert(url.toString().length)
Form = document.forms[frm].elements;
var URL="";
var encodedurl;
alert(url);
for (i=0;i<=Form.length;i++)
{
URL+="test"+Form[i].name;
}
//urlObject.setAttribute('href', url+encodedurl)
alert("success");
return false;
}
Comment