Html - CSS - XML - JavaScript - Ajax
Text Area"Ya Gülücük, Link, Resim Vb. Eklemek -Onclick-
Text Area"Ya Gülücük, Link, Resim Vb. Eklemek -Onclick-
-
<script language=JavaScript>
function AddForm(form )
{
document.formname.comment.value = document.formname.comment.value + form
document.formname.comment.focus( );
}
function commentKodu(Kod,TamYazi, YaziEkle ) {
if (Kod != "" ) {
KodEkle = prompt(TamYazi + "\nÖrnek : http://www.biadres.com", YaziEkle );
if ((KodEkle != null ) && (KodEkle != "" ) ){
document.formname.comment.value += "[" + Kod + "=" + KodEkle + "#]" + KodEkle + "[/"+ Kod + "] ";
}
}
document.formname.comment.focus( );
}
function FormDiger(Kod,TamYazi, YaziEkle ) {
if (Kod != "" ) {
KodEkle = prompt(TamYazi + "\n", YaziEkle );
if ((KodEkle != null ) && (KodEkle != "" ) ){
document.formname.comment.value += "[" + Kod + "#]" + KodEkle + "[/"+ Kod + "] ";
}
}
document.formname.comment.focus( );
}
</script>-----------------------------------------------------------------------------------------------------------------------
formname = formun adı
comment = text areanın adı
/Bunları formunuza göre düzenleyebilirsiniz ama formu bunlara göre düzenlemek daha kolay :)
Kod eklemek icin;
----------------------------------------------------------------------------------------------------------------------------
<input type="button" onClick="JavaScript:FormDiger('i','italikyazilacak yazi', '' )" value=" italik " class="btnitalik" onMouseOver="this.style.cursor='hand';">
smili eklemek icin;
------------------------------------------------------------------------------------------------------------------------------
<td style="border-style: dashed gray; border-width: 1">
<img src="icons/icon_smile.gif" onclick="comment.value+=(':)');">
<img src="icons/icon_confused.gif" onclick="comment.value+=(':confused');">
<img src="icons/icon_sad.gif" onclick="comment.value+=(':(');">
<img src="icons/icon_plain.gif" onclick="comment.value+=(':|');">
<img src="icons/icon_wink.gif" onclick="comment.value+=(';)');">
<img src="icons/icon_biggrin.gif" onclick="comment.value+=(':D');">
<img src="icons/icon_razz.gif" onclick="comment.value+=(':P');">
<img src="icons/icon_mad.gif" onclick="comment.value+=(':@');">
<img src="icons/icon_cry.gif" onclick="comment.value+=(':C');">
<img src="icons/icon_surprised.gif" onclick="comment.value+=(':o');">
<img src="icons/icon_sly.gif" onclick="comment.value+=(':x');">
<img src="icons/icon_o_o.gif" onclick="comment.value+=(':S');">
<img src="icons/icon_ow.gif" onclick="comment.value+=(':wo');">
<img src="icons/icon_void.gif" onclick="comment.value+=(':void');">
<img src="icons/icon_no.gif" onclick="comment.value+=(':no');">
<img src="icons/icon_yes.gif" onclick="comment.value+=(':yes');">
<img src="icons/icon_love.gif" onclick="comment.value+=(':love');"></td>----------------------------------------------------------------------------------------------------------------------------------
Örnek çalışma: http://www.turuncuu.somee.com/comments.asp?id=48
Çalışmayı indirmek için: comment form (sitenize göre düzenleyebilirsiniz.) ve smililer... http://www.turuncuu.somee.com/smili.rar