i have this code:
if (($has_freechat1['confirmed'] == 1) && ($has_freechat2['confirmed'] == 1))
{
$was_clicked = 0;
?>
<a href="freechatcontacts.php?id=<?php echo $id_to; ?>" class="charcoal_link" style="line-height: 20px;" name="message" id="message" onClick="return sendMessage('<?php echo $was_clicked;?> return false;')">
<?php echo $uniqueCode1?><span class="pink_text"><?php echo $uniqueCode2?></span><?php echo $uniqueCode3?>
</a>
<?php
if ($was_clicked == 1)
{
?>
<tr>
<td><input name="password" type="textarea" rows="10" cols="20" value="<?php echo $aCleanPost['message']['value']?>" /></td>
</tr>
<tr>
<td><br /><input name="cmdSubmit" type="submit" value="Send" /><br/> </td>
</tr>
<?php
}
}
then i have my JS:
<script type="text/JavaScript">
function sendMessage(val)
{
val = 1; //was clicked
return val;
}
</script>
$was_clicked stays 0, if it is = 1 i know the link was clicked and i then display textarea and the submit button
my js is not executing, can some one please help?
thank you