B
Baxter337
I am trying to pass a php variable that i get from a mysql text field
to a javascript function, but that text field has newlines in it.
<a href="#top"
onclick="closeit('my_docs');closeit('uploadLink');showit('docUpdate');setup_update_form('<?=$docrow[0]?>',
'<?=$docrow[2]?>', '<?=str_replace("\n", "", $docrow[3])?>')"><img
src="images/update.gif" width="90" height="60" border="0"></a></td>
when it turns to html i get somethign like this for setup_update_form
call:
setup_update_form('81', '(ttest)bottle.bmp', 'test line 1
test line 2
test line 3
test line 4')"><img src="images/update.gif" width="90" height="60"
border="0"></a></td>
this obviously doesnt work.
as you can see i have tried multiple string parsing function with no
success.
I dont know if this matters or not but the form that is getting
submitted to the mysql database has enctype="multipart/form-data"
Any help would be greatly apreciated. Thanks!
to a javascript function, but that text field has newlines in it.
<a href="#top"
onclick="closeit('my_docs');closeit('uploadLink');showit('docUpdate');setup_update_form('<?=$docrow[0]?>',
'<?=$docrow[2]?>', '<?=str_replace("\n", "", $docrow[3])?>')"><img
src="images/update.gif" width="90" height="60" border="0"></a></td>
when it turns to html i get somethign like this for setup_update_form
call:
setup_update_form('81', '(ttest)bottle.bmp', 'test line 1
test line 2
test line 3
test line 4')"><img src="images/update.gif" width="90" height="60"
border="0"></a></td>
this obviously doesnt work.
as you can see i have tried multiple string parsing function with no
success.
I dont know if this matters or not but the form that is getting
submitted to the mysql database has enctype="multipart/form-data"
Any help would be greatly apreciated. Thanks!