Имеется скрипт:
Код
<script type="text/javascript">
function sendpmmes() {
s = pmtouser;
subject = userpmsubj;
message = userpmmes;
$.get("/index/14-0-0-1", function (pm) {
ssid = $("input[name='ssid']", pm).val();
if ($("#secuImg", pm).size() > 0) {
imgsec = $("#secuImg", pm).clone();
seckey = $("input[name='seckey']", pm).val();
new _uWnd('cap', 'Антиспам - введите код с картинки', 300, 80, {
autosize: 0,
modal: 1,
oncontent: function () {
$("#capImgSpan").html(imgsec);
$("#capcode").focus();
}
},
'<span id="capImgSpan"></span> <input type="text" id="capcode" onkeyup="ucodesru.sendsec()">');
} else {
$.post("/index", {
s: s,
subject: subject,
message: message,
ssid: ssid,
a: 18
},
function (re) {
var rTxt = $($(re).text()).text();
if(rTxt.indexOf("успешно") > -1) {
_uWnd.alert(rTxt, 'Внимание', {
w: 225,
h: 75
});
} else {
_uWnd.alert(rTxt, 'Внимание', {
w: 225,
h: 75
});
}
});
}
});
}}
</script>
Код
<a href="javascript://" rel="nofollow" onclick="function(){var pmtouser = 'я_пользователь'; var userpmsubj = 'я_тема'; var userpmmes = 'я_сообщение'; sendpmmes();};return false;">Отправить сообщение</a>
Вроде все правильно, но не работает. Где здесь косяк?
Заранее Спасибо за ответ.