Я не знаю достаточно о javascript, чтобы выяснить, почему строка в этом script, которая начинается с "window.open...", выдает неверную ошибку аргумента в IE7-8-9b. Хорошо работает в Firefox и Webkit.
(script отображается с помощью 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");
}
};