There is one textarea and one select box on my popup page, textarea allow user to input texts there, and when user select one option from select box, the value will add to the textarea autommatically, fx. if user input “I like here.” and then he choose (option1): I will go to this site. Then the content in textarea would be I like here. I will go to this site. now I want to put a hyperlink on “this site”. How could I do this? I tried below codes, but it does not work.
In popup.php:
…
while ($row = $GLOBALS[‘TYPO3_DB’]->sql_fetch_assoc($res)) { $content = ‘<h1>’.$GLOBALS[‘LANG’]->getLL(‘header_’.$row[‘category’]).$row[‘first_name’].'</h1><p>’.nl2br($row[‘prayer’]).'</p>
<p></p><p><b>Send them Encouragement</b> (this will be directly emailed to them)</p>
<input type=”hidden” class=”prayer-id” value=”‘.$row[‘uid’].'” />
<textarea class=”prayer-textarea”></textarea>
<select class=”prayer-select” >
<option value=” I will go to <a href=’sina.com’>this site</a>”>option1</option>
<option value=”b”>b</option>
</select>
<p class=”prayer-button”><input type=”button” value=”‘.$GLOBALS[‘LANG’]->getLL(‘button_send’).'” /></p>
‘;
…
In popup.js
…
$(‘.prayer-select’).change(function() {
$(‘.prayer-textarea’).val($(‘.prayer-textarea’).val()+$(‘.prayer-select’).val());
…
});
[canned-message]attachments-removed-during-migration