
An incredibly simple problem:
Code:
function checkforstring(fieldname) {
alert(fieldname);
var formfieldvalue = document.getElementById(fieldname).value
alert(formfieldvalue);
}
When running that, it alerts the value of the parameter passed to the function (the first alert), then Firefox returns the following error:
Error: document.getElementById(fieldname) has no properties
Source File: http://localhost:8084/shop/index.php?edit
Line: 15
Could someone with a bit JavaScript brain help me out on this one.
Cheers,
Rich