Каталог файлов |
Рейтинг:5.0
Категория: Скрипты для Ucoz
Решил попробовать свои знания в написании формы добавления комментариев очень похожей на форму ВК.
Форма не расчитана для не авторизованных пользователей. Лучше ещё отключить каптчу для всех групп пользователей, чтобы было более похожа на форму ВК.
Установка:
В css:
Code
#prikr {float:right}
.clName1 {height:25px;}
.clName2 {height:50px;}
.clxName4 {float:right}
.clName1 {height:25px;}
.clName2 {height:50px;}
.clxName4 {float:right}
В форму добавления комментариев:
Code
<div align="center" style="padding:10px;width:400px">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td width="100%">$ERROR$</td></tr>
<tr>
<td valign="top">
<img src="" style="width:50px;height:50px;">
</td>
<td valign="top">
<div class="divvv">
<textarea width="300px" id="content2" class="clName1" onclick="" rows="8" name="message" id="message" cols="50" style="display: inline">
$MESSAGE$</textarea>
</div>
<div style="padding:5px;align:left;">
<?if$SECURITY_CODE$?><div class="clxName4" style="display:none">$SECURITY_CODE$</div><?endif?>
<input type="submit" style="display:none" class="clxName3" id="addcBut" name="submit" value="Добавить комментарий">
</div>
</td></tr>
</table>
<script>
$('#content2').focus(function(){
$("#content2").attr({"style":"height:50px;"})
$(".clxName3").removeAttr("style");
$(".clxName4").removeAttr("style");
$("#prikr").removeAttr("style");
});
$('#content2').blur(function(){
if($('#content2').val().length == '0'){
$("#content2").attr({"style":"height:25px;"});
$(".clxName3").attr({"style":"display:none;"})
$(".clxName4").attr({"style":"display:none;"})
$("#prikr").attr({"style":"display:none;"})
}
});
</script>
</div>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td width="100%">$ERROR$</td></tr>
<tr>
<td valign="top">
<img src="" style="width:50px;height:50px;">
</td>
<td valign="top">
<div class="divvv">
<textarea width="300px" id="content2" class="clName1" onclick="" rows="8" name="message" id="message" cols="50" style="display: inline">
$MESSAGE$</textarea>
</div>
<div style="padding:5px;align:left;">
<?if$SECURITY_CODE$?><div class="clxName4" style="display:none">$SECURITY_CODE$</div><?endif?>
<input type="submit" style="display:none" class="clxName3" id="addcBut" name="submit" value="Добавить комментарий">
</div>
</td></tr>
</table>
<script>
$('#content2').focus(function(){
$("#content2").attr({"style":"height:50px;"})
$(".clxName3").removeAttr("style");
$(".clxName4").removeAttr("style");
$("#prikr").removeAttr("style");
});
$('#content2').blur(function(){
if($('#content2').val().length == '0'){
$("#content2").attr({"style":"height:25px;"});
$(".clxName3").attr({"style":"display:none;"})
$(".clxName4").attr({"style":"display:none;"})
$("#prikr").attr({"style":"display:none;"})
}
});
</script>
</div>
Советую взглянуть:
Новый вид жалобы переделка скрипт для ucoz Мини-профиль в ajax-окошке, на куках Multi - адаптация шаблона под uCoz Скрипт-Информер "Топ Аплоадеров (Пользователей)" для Ucoz
Всего комментариев: 0 | |