Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
How to set popup's parameters?
Old 08-06-2004, 10:33 AM How to set popup's parameters?
Junior Talker

Posts: 3
Trades: 0
Hello, there is my code:
var newwindow;
function open_popup(url)
{
newwindow=window.open(url,'name','height=400,width =200,left=100,right=200');
if (window.focus) {newwindow.focus()}
}


<a href="javascriptpen_popup('mypopup.html');">Pop it</a>

How to modify this script to be able to supply url, dimensions and position as function arguments (not only url as is now)? I mean function which looks like this: open_popup(url,width,height,left,top). Is it possible?

Thanks!
Vukas is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-06-2004, 02:07 PM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
function open_popup(url,nWidth,nHeight,nLeft,nTop) {
newwindow = window.open(url,'name','height='+nHeight+',width=' +nWidth+',left='+nLeft+',top='+nTop);
if(window.focus) { newwindow.focus(); }
}
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Reply     « Reply to How to set popup's parameters?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09617 seconds with 12 queries