Go Back   SitePoint Forums > Forum Index > Design Your Site > Web Page Design
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Jun 14, 2004, 03:11   #1
ArticleBot
SitePoint Articles
 
ArticleBot's Avatar
 
Join Date: Apr 2001
Posts: 0
Discussion thread for Create Pop-ups Without Dead Links

This is a dedicated thread for discussing the SitePoint article 'Create Pop-ups Without Dead Links'
ArticleBot is offline   Reply With Quote
Old Jun 24, 2004, 02:27   #2
mediaman_12
SitePoint Addict
 
Join Date: Mar 2003
Location: UK
Posts: 246
Quote:
Originally Posted by Chris
If you want to use several targets, you need to change the check for _blank and read the target name. Then you use the target name to set the name of the new window.
if(as[i].target!='')
{
popfun=function(){
window.open(this.href,this.target,windowAttributes);
return false;
};
Please expand on this, How would you send different windowAttributes to the specified targets? If if put the different names in the target!='high' it efects all the popups EXCEPT the one I name.
This is the old version that used Dreemweavers built in popup code. there are 2 sizes of popup.
Thanks for any insights.

Last edited by mediaman_12; Jun 24, 2004 at 03:37.
mediaman_12 is offline   Reply With Quote
Old Jun 25, 2004, 05:35   #3
codepoet
SitePoint Addict
 
Join Date: Jun 2004
Location: UK, London
Posts: 314
Quote:
Originally Posted by mediaman_12
Please expand on this, How would you send different windowAttributes to the specified targets? If if put the different names in the target!='high' it efects all the popups EXCEPT the one I name.
This is the old version that used Dreemweavers built in popup code. there are 2 sizes of popup.
Thanks for any insights.
You can check for your different popup classes and but in bespoke attributes

if(as[i].target=='target1')
{
popfun=function(){
window.open(this.href,this.target,'width=100,height=100');
return false;
};
if(as[i].target=='target2')
{
popfun=function(){
window.open(this.href,this.target,'width=400,height=400');
return false;
};

or smoother would be

if(as[i].target!='')
{
var attribs;
switch (as[i].target)
{
case 'target1':
attribs='width=100,height=100';
break;
case 'target2':
attribs='width=400,height=400';
break;
// ... and so on
}
as[i].attribs=attribs;
popfun=function(){
window.open(this.href,this.target,this.attribs);
return false;
};

and so on.
codepoet is offline   Reply With Quote
Old Jun 28, 2004, 04:07   #4
mediaman_12
SitePoint Addict
 
Join Date: Mar 2003
Location: UK
Posts: 246
Thanks a lot, after a bit of a struggle (including ridding the site of JS rollovers), I managed to get the lower version working.
mediaman_12 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
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
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 00:44.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved