Still need to add in location:0 and menubar:0 because some people like to be able to copy the url (location) and use the menu to print (menubar).
Here I’ve done it for you…
settings = {
location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
[…your current code here…]
}
I don’t know if it’s a bug or it’s just me but I can’t control the “height” parameter. The popup take the whole height of the page in all browsers mac and pc i tested đŚ
I donât know if itâs a bug or itâs just me but I canât control the âheightâ parameter. The popup take the whole height of the page in all browsers mac and pc i tested
Question:
How can I activate the popupwindow with a class other than “.popupwindow” ? Simply changing the name doesn’t work as this causes an Error in IE ($ is not defined).
I’m trying to get popupwindow to work inside of tabs I call with ajax using the jquery ui tabs script. I’ve been told to use the livequery plugin and that will rebind the popupwindow jquery onto any content loaded with ajax. This is what I’ve come up with but it doesn’t work.
$(“.popupwindow”)
.livequery(“click”, function() {
var name = settings.createnew ? “PopUpWindow” + index : “PopUpWindow”;
window.open(this.href, name, parameters).focus();
return false;});
Thanks for the e-mail you sent, it worked. However, it wasn’t working for links with profiles. The following works for both profile links and links using the default settings. Thanks again.
[…] PopupWindow v2.0.0 now available […]
Still need to add in location:0 and menubar:0 because some people like to be able to copy the url (location) and use the menu to print (menubar).
Here I’ve done it for you…
settings = {
location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
[…your current code here…]
}
and
parameters = “location=” + settings.location + “menubar=” + settings.menubar + “,height=” + settings.height + “,width=” + settings.width + “,toolbar=” + settings.toolbar + “,scrollbars=” + settings.scrollbars + “,status=” + settings.status + “,resizable=” + settings.resizable + “,left=” + settings.left + “,screenX=” + settings.left + “,top=” + settings.top + “,screenY=” + settings.top;
I don’t know if it’s a bug or it’s just me but I can’t control the “height” parameter. The popup take the whole height of the page in all browsers mac and pc i tested đŚ
I donât know if itâs a bug or itâs just me but I canât control the âheightâ parameter. The popup take the whole height of the page in all browsers mac and pc i tested
The same to me…
Ok, I think it’s very simple (I think!! I’m not a good programmer… :-()
I believe you have forgotten two commas in this line:
parameters = “location=” + settings.location + “menubar=” + settings.menubar + “height=” + settings.height + “,width=” + settings.width + “,toolbar=” + settings.toolbar + “,scrollbars=” + settings.scrollbars + “,status=” + settings.status + “,resizable=” + settings.resizable + “,left=” + settings.left + “,screenX=” + settings.left + “,top=” + settings.top + “,screenY=” + settings.top;
Change with:
parameters = “location=” + settings.location + “,menubar=” + settings.menubar + “,height=” + settings.height + “,width=” + settings.width + “,toolbar=” + settings.toolbar + “,scrollbars=” + settings.scrollbars + “,status=” + settings.status + “,resizable=” + settings.resizable + “,left=” + settings.left + “,screenX=” + settings.left + “,top=” + settings.top + “,screenY=” + settings.top;
thanks for the heads up everyone. the bug has been fixed. you can download the new version from the box.net widget
Nice plugin. Exactly what I needed.
Question:
How can I activate the popupwindow with a class other than “.popupwindow” ? Simply changing the name doesn’t work as this causes an Error in IE ($ is not defined).
@stefanL
I think you’re getting the plugin and the selector confused. to apply popupwindow, you need to append it to a selector like so
$(‘.mywindows’).popupwindow();
or
$(‘#newwindow’).popupwindow();
[…] features. PopupWindow lets you create javascript popup windows for static links on your web site.https://rip747.wordpress.com/2008/01/22/popupwindow-v200-now-available/MRQE – Movie Review Query Engine – REAR WINDOWWeb’s largest online directory of movie […]
I’m trying to get popupwindow to work inside of tabs I call with ajax using the jquery ui tabs script. I’ve been told to use the livequery plugin and that will rebind the popupwindow jquery onto any content loaded with ajax. This is what I’ve come up with but it doesn’t work.
$(“.popupwindow”)
.livequery(“click”, function() {
var name = settings.createnew ? “PopUpWindow” + index : “PopUpWindow”;
window.open(this.href, name, parameters).focus();
return false;});
Thanks for the e-mail you sent, it worked. However, it wasn’t working for links with profiles. The following works for both profile links and links using the default settings. Thanks again.
$(“.popupwindow”).livequery(function(){
$(this).popupwindow(profiles);
});
What is the license on this code?
All the code that I produce is open sourced. Do with it what you want.