I don’t plan you’ll debug it, but maybe you could see in a moment:
I wrote a simple page that shows “running messages”.
However it works for Chrome only (not FF or IE)
http://hydepark.apphb.com/display.aspx
I see this is a server side issue, but it doesn’t make sense as it’s browser dependant.
You have an idea?
var msgsList = [{"Guid":"c281e6ec-acdc-4c35-80ee-12c9ba1ab95e","Author":"2","Content":"222","Email":"22","CreationDate":"\/Date(1321389457043)\/","Rating":0,"Path":"D:\\websites\\b1\\08c47\\4f839e3\\_PublishedWebsites\\TB.Site\\c281e6ec-acdc-4c35-80ee-12c9ba1ab95e.html"},{"Guid":"58aaa80d-f09e-439a-bec6-60b090f39c26","Author":"1","Content":"111","Email":"11","CreationDate":"\/Date(1321389451653)\/","Rating":0,"Path":"D:\\websites\\b1\\08c47\\4f839e3\\_PublishedWebsites\\TB.Site\\58aaa80d-f09e-439a-bec6-60b090f39c26.html"}];
var pagePath = window.location.pathname;
//parses the list
$(document).ready(function ()
{
parseList = function(pos,list)
{
if (pos < list.length)
{
var obj = list[pos];
TextArea1.value = obj.Content;
Author.value = obj.Author;
var newHeading = encodeURIComponent( window.location.href +"?id="+ obj.Guid );
var likeFrame = $('.fb-like iframe');
//var likeFrame = $('iframe.fb_ltr')[0];
var newHref = 'href=' + newHeading + '&layout=';
var newSrc = likeFrame.attr('src').replace(/href=.+&layout=/, newHref);
likeFrame.attr('src', newSrc);
setTimeout(function(){parseList(++pos,list);}, 5000);
}
else
{
//PageMethod('RefillMessages', [], AjaxSucceeded, AjaxFailed);
WebMethod('RefillMessages', [], AjaxSucceeded, AjaxFailed);
}
}
setTimeout(function(){parseList(0,msgsList);}, 2000);
//parseList(0,msgsList);
});
You should never just reference an element by its id. Some browsers will support this for old old >10 years ago way of coding.