Hallo ich habe hier ein Javascript für Bookmarks. Problem ist das ich es machen kann wie ich will mit target="_blank" oder onclick = window.open bei Click auf das jeweilige Icon wird einfach kein neues Tab oder Fenster geöffnet.
Wie muss das Script aussehen das es in neuen Fenster öffnet?
In der Theorie ist es so einfach aber irgendwie mach ich es nicht richtig!
Wie muss das Script aussehen das es in neuen Fenster öffnet?
Java:
var imgpath = "/bookmarkscript/gfx/";//ADD trailing slash
var sburl = encodeURIComponent(location.href);
var sbtitle = encodeURIComponent(document.title);
{
var txtsite = "Diese Seite bei";
var txtenter = " bookmarken.";
var facebook_com = "location.href='http://de.facebook.com/sharer.php?u='+sburl+'&t='+sbtitle;return false";
var myspace_com = "location.href='http://www.myspace.com/index.cfm?fuseaction=postto&u='+sburl+'&t='+sbtitle;return false";
var misterwong_de = "location.href='http://www.mister-wong.de/index.php?action=addurl&bm_url='+sburl+'&bm_description='+sbtitle;return false";
var delicio_us = "location.href='http://del.icio.us/post?v=2&url='+sburl+'&title='+sbtitle;return false";
var google_com = "location.href='http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+sburl+'&title='+sbtitle;return false";
var stumbleupon_com = "location.href='http://www.stumbleupon.com/submit?url='+sburl+'&title='+sbtitle;return false";
var yahoo_com = "location.href='http://de.myweb2.search.yahoo.com/myresults/bookmarklet?t='+sbtitle+'&u='+sburl;return false";
var yigg_de = "location.href='http://yigg.de/neu?exturl='+sburl;return false";
var alltagz_de = "location.href='http://www.alltagz.de/bookmarks/?action=add&address='+sburl+'&title='+sbtitle;return false";
var oneview_de = "location.href= 'http://www.oneview.de/quickadd/neu/addBookmark.jsf?URL=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title);return false";
var seekxl = "location.href= 'http://social-bookmarking.seekxl.de/neu/?add_url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title);return false";
var favoriten = "location.href= 'http://www.favoriten.de/url-hinzufuegen.html?bm_url=' + encodeURIComponent(location.href) + '&title=' + encodeURIComponent(document.title);return false";
document.write('<a href="http://de.facebook.com/" rel="nofollow" onClick="' + facebook_com +'" title="' + txtsite +' facebook.com' + txtenter +'"><img src="' + imgpath +'facebook.gif" alt="' + txtsite +' facebook.com' + txtenter +'" border="0"></a> ')
document.write('<a href="http://www.myspace.com/" rel="nofollow" onClick="' + myspace_com +'" title="' + txtsite +' [url=http://www.myspace.com]MySpace: Musik, Videos, Games und mehr[/url]' + txtenter +'"><img src="' + imgpath +'myspace.gif" alt="' + txtsite +' myspace.com' + txtenter +'" border="0"></a> ')
document.write('<a href="http://www.mister-wong.de/" rel="nofollow" onClick="' + misterwong_de +'" title="' + txtsite +' [url=http://www.mister-wong.de]Mister Wong | Social Bookmarking Tool[/url]' + txtenter +'"><img src="' + imgpath +'misterwong.gif" alt="' + txtsite +' Mister Wong' + txtenter +'" border="0"></a> ')
document.write('<a href="http://del.icio.us/" rel="nofollow" onClick="' + delicio_us +'" title="' + txtsite +' del.ico.us' + txtenter +'"><img src="' + imgpath +'delicio.gif" alt="' + txtsite +' del.ico.us' + txtenter +'" border="0"></a> ')
document.write('<a href="http://www.google.com/" rel="nofollow" onClick="' + google_com +'" title="' + txtsite +' google.com' + txtenter +'"><img src="' + imgpath +'google.gif" alt="' + txtsite +' google.com' + txtenter +'" border="0"></a> ')
document.write('<a href="http://www.stumbleupon.com/" rel="nofollow" onClick="' + stumbleupon_com +'" title="' + txtsite +' stumbleupon.com' + txtenter +'"><img src="' + imgpath +'stumbleupon.gif" alt="' + txtsite +' stumbleupon.com' + txtenter +'" border="0"></a> ')
document.write('<a href="http://de.myweb2.search.yahoo.com/" rel="nofollow" onClick="' + yahoo_com +'" title="' + txtsite +' yahoo.com' + txtenter +'"><img src="' + imgpath +'yahoo.gif" alt="' + txtsite +' yahoo.com' + txtenter +'" border="0"></a> ')
document.write('<a href="http://yigg.de/" rel="nofollow" onClick="' + yigg_de +'" title="' + txtsite +' yigg.de' + txtenter +'"><img src="' + imgpath +'yigg.gif" alt="' + txtsite +' yigg.de' + txtenter +'" border="0"></a> ')
document.write('<a href="http://www.alltagz.de/" rel="nofollow" onClick="' + alltagz_de +'" title="' + txtsite +' alltagz.de' + txtenter +'"><img src="' + imgpath +'alltagz.gif" alt="' + txtsite +' alltagz.de' + txtenter +'" border="0"></a> ')
document.write('<a href="http://oneview.de/" rel="nofollow" onClick="' + oneview_de +'" title="' + txtsite +' oneview.de' + txtenter +'"><img src="' + imgpath +'oneview.gif" alt="' + txtsite +' oneview.de' + txtenter +'" border="0"></a> ')
document.write('<a href="http://social-bookmarking.seekxl.de" rel="nofollow" onClick="' + seekxl +'" title="' + txtsite +' seekxl.de' + txtenter +'"><img src="' + imgpath +'seekxl.gif" alt="' + txtsite +' seekxl.de' + txtenter +'" border="0"></a> ')
document.write('<a href="http://www.favoriten.de" rel="nofollow" onClick="' + favoriten +'" title="' + txtsite +' favoriten.de' + txtenter +'"><img src="' + imgpath +'favoriten.gif" alt="' + txtsite +' favoriten.de' + txtenter +'" border="0"></a> ')
}
In der Theorie ist es so einfach aber irgendwie mach ich es nicht richtig!