My JavaScript function works fine, but I have problems getting different ids from the PHP input box.
window.onload = function() { new JsD
Change:
id= \"inputField+$k\" name=...
To:
id=\"inputfield$k\" name=...
What is screwing it up is the "+" sign. PHP uses "." to concatenate strings. ECHO out $k properly and you shouldn't have any trouble
ECHO
$k