Here is my code in JavaScript and I want to create innerhtml button that will fill some hidden fields in my html form and I have problem maybe with the quotes, when I try to fill the AirportsForm.kod variable...\[code\]function EditTableCell(a){ var Myp= document.getElementById(a); var nam=Myp.textContent; var kod=Myp.id; alert(kod); var newHTML='<p id="'+a+'"><input size="35" type="text" name="edit'+a+'" id="edit'+a+'" value="'+nam+'" /><input type="button" value="http://stackoverflow.com/questions/13876679/Change" onclick="document.AirportsForm.kod.value='http://stackoverflow.com/questions/13876679/+"'a'"+'.value;document.AirportsForm.promena.value=http://stackoverflow.com/questions/13876679/document.AirportsForm.edit'+a+'.value;document.AirportsForm.submit();"/></p>';}\[/code\]here is the html: Its in the form AirportsForm \[code\]<input type="hidden" name="promena" id="promena" value="" /><input type="hidden" name="kod" id="kod" value="" />\[/code\]And in Php, I do \[code\]$variable=$_POST["kod"]\[/code\] and for other hidden element.