Ok resio sam ovaj problem sa zarezima...
Evo koda resenja
PHP kôd:
echo '<input type="text" id="km" /> <br \>';
echo '<input type="button" value="Izracunaj" onClick="window.getCena(\''.$start.'\',\''.$tarifaDB.'\','."document.getElementById('km').value".')" />' ;
Ali opet vraca text polje kad undefined