Я недостаточно знаю о javascript, чтобы понять, почему строка в этом сценарии, начинающаяся "window.open ...", выдает ошибку недопустимого аргумента в IE7-8-9b. Работает нормально в Firefox и Webkit.
(сценарий вызывается с помощью onclick = "share.fb ()"
в html-ссылке и открывает новое окно браузера для публикации в FB и Twitter).
var share = {
fb:function(title,url) {
this.share('http://www.facebook.com/sharer.php?u=##URL##&t=##TITLE##',title,url);
},
tw:function(title,url) {
this.share('http://twitter.com/home?status=##URL##+##TITLE##',title,url);
},
share:function(tpl,title,url) {
if(!url) url = encodeURIComponent(window.location);
if(!title) title = encodeURIComponent(document.title);
tpl = tpl.replace("##URL##",url);
tpl = tpl.replace("##TITLE##",title);
window.open(tpl,"sharewindow"+tpl.substr(6,15),"width=640,height=480");
}
};