Posted by juicy on 04/24/06 11:11
I have create a checkbox,call getS function in onclick event. I append
value of variable output with value $text. It works well but when I
changed value of $text to a paragraph of text, it will occur error on the
page. Please advise. Thanks.
<script language = "javascript">
<?php $text = "testing"; ?>
function getS (id){
var output = "";
if (document.getElementById("id").checked)
{
output = output + <? echo $text; ?> ;
}}
</script>
Navigation:
[Reply to this message]
|