javascript - what do i need to open this in a popup or new window? -
i'm making bookmarklet website, , have:
<a href="javascript:location.href='http://website.com/compartir_link.php?url='+encodeuricomponent(location.href)" >save this</a>
wich works fine, problem when try open in new tab: it's when try save: about:blank (in firefox)
and want able without loosing current video, that's why thouhgt poput, funcionally target="_blank" work me,
any suggestion? thank mucho!
pd: link saved bookmark in browser (maybe in other webistes), facebook's bookmarklet/sharer
edit
after replies have /js/file.js
jquery("body").ready(function(){ jquery(".keep_btn").click(function(event) { event.preventdefault(); if(this.href=""){ this.href=document.url; } window.open("http://website.com/api/public/compartir_link.php?url="+this.href,'about keep', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=450,height=400'); });
});
and use in iframe containg:
<a class="keep_btn" href="#" style="background-color:red;color:white;">keeps</a>
which works need (in case using in external website)
but how can use in regular can save browser?
my best regards
javascript call...
from link:
<a href="#" onclick="openit();return true">click here open</a>
from button in form:
<input type="button" value="open window" onclick="openit()" /> function openit() { w=window.open(linkurl, reportname, "resizable=yes, directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no,top=50,height=600, width=900"); }
Comments
Post a Comment