ilyadenisovid
Мастер
Дата регистрации:
28.01.2013 18:32:29
Сообщений: 213
<?php
if(isset($_POST["text_submit"])) {
$t = $_POST["text"];
$where = array("[a]", "[/a]"
$what = array("<a href = '", "'></a>"
$text = str_replace($where, $what, $t);
}
?>
<script>
function x () {return;}
function FocusText() {
document.forma.text.focus();
document.forma.text.select();
return true;
}
function DoSmilie(addSmilie) {
var revisedmsgage;
var currentmsgage = document.forma.text.value;
revisedmsgage = currentmsgage + addSmilie;
document.forma.text.value = revisedmsgage;
document.forma.text.focus();
return;
}
function DoPrompt(action) {
var revisedmsgage;
var currentmsgage = document.forma.qmsgage.value;
}
</script>
<form action = "" method = "post" name = "forma">
<textarea name = "text" id = "comment"></textarea>
<input type = "submit" name = "text_submit" value = "Готово" />
<a href = "javascript:%20x()" onclick = "DoSmilie('[a][/a]');">[URL]</a>
</form>