I define my html by setting it equal to a variable i am echoing, just for the sake of keeping my php page dynamic, however i am trying to append another input div onto my text area once a button is clicked via a javascript statement. In terms of syntax i cant seem to find any errors, is this just not allowed?
this is the code for my comment area,
$comment_ui = '<textarea id="statustext" onkeyup="statusMax(this,250)" onfocus="showBtnDiv()" placeholder="What's new with you '.$u.'?"></textarea>';
$comment_ui .= '<div id="uploadDisplay_SP"></div>';
$comment_ui .= '<div id="btns_SP" class="hiddenStuff">';
$comment_ui .= '<form action=""><input id="gendercheck" type="checkbox" name="male" onclick="gendertoggle()">male</form>';
$comment_ui .= '<img src="images/topic.JPG" id="triggerTopic" class="triggerBtn" onclick="showtitleDiv" width="137" height="22" title="Add a title" />';
$comment_ui .= '<button id="statusBtn" onclick="postToStatus(\'status_post\',\'c\',\''.$u.'\',\'statustext\',\''.$male.'\',\'title\')">Post</button>';
$comment_ui .= '<img src="images/camera.JPG" id="triggerBtn_SP" class="triggerBtn" onclick="triggerUpload(event, \'fu_SP\')" width="137" height="22" title="Upload A Photo" />';
$status_ui .= '</div>';
notice i included an image icon for adding a topic to a comment that on click calls this function
function showtitleDiv(){
_("statustext").prepend('<input id="title" onkeyup="statusMax(this,30)" placeholder="Topic headline..."><br />');
/*_("triggerTopic").style.display = "block";*/
}
and i echo the $comment_ui in the body of my document, everything shows, and the comments work, its just the showtitleDiv function isnt working
the javascipt console doesnt show any errors, is the syntax wrong? I appreciate any and all of your expertise!