Доброго времени суток! Возникла следующая проблема.
Вот этот скрипт почему то не работает на сервере
$(document).ready(function() {
var imgPoll = new Image();
imgPoll.src = 'images/red-bar.png';
$("#btnSubmit").mouseover(function() {
$("#btnSubmit").css("background-color", "#6699cc")
});
$("#btnSubmit").mouseout(function() {
$("#btnSubmit").css("background-color", "#336699")
});
if ($("#divVoted").length > 0) //Already voted
{
animateResults();
$("#ctl00_RightContent_Headertxt").text("РЕЗУЛЬТАТЫ ОПРОСА");
}
else {
$("#rdoPoll0").attr("checked", "checked"); //default select the first Choice
// Add the page method call as an onclick handler for the Vote button.
// For more details about how to use JQuery to call Asp.Net AJAX page methods refer follwoing blog posts
// [url]http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/[/url]
// [url]http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/[/url]
$("#btnSubmit").click(function() {
alert('ha-ha');
$("#divPoll").css("cursor", "wait"); //show wait cursor inside Poll div while processing
$("#btnSubmit").attr("disabled", "true") //disable the Vote button while processing
var pID = $("input[id$=hidPollID]").val(); //get Poll ID
var cID = $("input[name='rdoPoll']:checked").val(); //get the checked Choice
var data = "{'pID':'" + pID + "', 'cID':'" + cID + "'}"; //create the JSON data to send to server
$.ajax(
{ //call the Page method using JQuery ajax
type: "POST",
url: "BudReport.aspx/UpdatePollCount",
data: data,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) //show the result
{
alert(msg.d);
$("#ctl00_RightContent_Headertxt").text("РЕЗУЛЬТАТЫ ОПРОСА");
$("#divPoll").css("cursor", "default"); //remove the wait cursor
$("#btnSubmit").attr("disabled", "false") //enable the Vote button
$("div[id$=divAnswers]").fadeOut("fast").html(msg.d).fadeIn("fast", function() { animateResults(); });
},
Error: function() { alert(msg.d); }
});
});
}
function animateResults() {
$("div[id$=divAnswers] img").each(function() {
var percentage = $(this).attr("val");
$(this).css({ width: "0%" }).animate({ width: percentage }, 'slow');
});
}
});
страница,где должен работать скрипт. И тут же вот этот скрипт тоже почему то не рабатывает(локально работает нормально)
$(document).ready(function() {
$('caption.month').corner("top");
$('table.tbl').corner();
$('td.monthtd').corner("top");
var a = $('#yan').height();
var b = $('#feb').height();
var c = $('#mar').height();
var row1H = 0;
if (a > b) {
if (a > c) {
row1H = $('#yan').height();
}
else {
row1H = $('#mar').height();
}
}
else {
if (b > c) {
row1H = $('#feb').height();
}
else {
row1H = $('#mar').height();
}
}
$('#yan').height(row1H);
$('#feb').height(row1H);
$('#mar').height(row1H);
var d = $('#apr').height();
var e = $('#mai').height();
var f = $('#jun').height();
if (d > e) {
if (d > f) {
row1H = $('#apr').height();
}
else {
row1H = $('#jun').height();
}
}
else {
if (e > f) {
row1H = $('#mai').height();
}
else {
row1H = $('#jun').height();
}
}
$('#apr').height(row1H);
$('#mai').height(row1H);
$('#jun').height(row1H);
var g = $('#jul').height();
var i = $('#aug').height();
var j = $('#sep').height();
if (g > i) {
if (g > j) {
row1H = $('#jul').height();
}
else {
row1H = $('#sep').height();
}
}
else {
if (i > j) {
row1H = $('#aug').height();
}
else {
row1H = $('#sep').height();
}
}
$('#jul').height(row1H);
$('#aug').height(row1H);
$('#sep').height(row1H);
var k = $('#oct').height();
var l = $('#nov').height();
var m = $('#dec').height();
if (k > l) {
if (k > m) {
row1H = $('#oct').height();
}
else {
row1H = $('#dec').height();
}
}
else {
if (l > m) {
row1H = $('#nov').height();
}
else {
row1H = $('#dec').height();
}
}
$('#oct').height(row1H);
$('#nov').height(row1H);
$('#dec').height(row1H);
[URL="http://pilotgroup.ru/ActionsCalendar.aspx"]тут[/URL]
});
(при загрузке скрипт определяет большую высоту в строке и привает остальным это значение. Скрипт делает то же самое при изменении размеров страницы-в этом случае ве четко+juqery corners в обоих лучах не срабатывает)