Im tring to pass a string which im getting from my database to a javascript function.
In my php I have:
<input type="image" name="edit_me" id="edit_me" value="<?php echo $row['id']; ?>" onClick="edit_chirp(<?php echo $row['id']; ?>)"/> //THIS WORKS
When I pass the id im getting it works fine but when I pass a field where it has text it doesnt work.
<input style="float:right" type="image" name="edit_me" id="edit_me" value="<?php echo $row['id']; ?>" onClick="edit_chirp(<?php echo $row['content']; ?>)" //THIS DOESNT WORK
My javascript function is
function edit_chirp(somethig)
{
alert(somethig);
}