Topic: target="_blank" FIXED WIDTH? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=9598" title="Pages that link to Topic: target=&amp;quot;_blank&amp;quot; FIXED WIDTH? (Page 1 of 1)" rel="nofollow" >Topic: target=&quot;_blank&quot; FIXED WIDTH? <span class="small">(Page 1 of 1)</span>\

 
Nat*
Nervous Wreck (II) Inmate

From: PA
Insane since: Feb 2003

posted posted 02-11-2003 04:20

Hello to everyone&#8230; What a great site!
I have a very basic question to ask (I think basic). When using the target="_blank&#8221; tag to launch a new window, is there any way to set a size constraint on the new window that opens? I would like my window to open around 575 pixels (w)/ 200pixels(h) instead of a full page. Is there any way to set this fixed width?
Thanks in advance for any help.


JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 02-11-2003 04:32

instead of target _blank, give this a whirl

<a href="http://ozoneasylum.com" onclick="window.open(this.href, 'popupwindow', 'width=500,height=500,scrollbars,resizable'); return false;">popup</a>

Jason

Nat*
Nervous Wreck (II) Inmate

From: PA
Insane since: Feb 2003

posted posted 02-11-2003 05:02

Wonderful... It worked like a charm -- Thanks a bunch!


Inri
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Oct 2004

posted posted 10-25-2004 22:23

Is it also possible to align were on the screen the window pops up ?

reitsma
Maniac (V) Mad Scientist

From: the smaller bedroom
Insane since: Oct 2000

posted posted 10-26-2004 01:54

yes, yes it is!


<a href="http://ozoneasylum.com" onclick="window.open(this.href, 'popupwindow', 'width=500,height=500,left=200,top=5,scrollbars,resizable'); return false;">popup</a>

try this link for more fun details:

http://www.wizardscc.com/wizards/newwindow.asp


seems to be similar to an old gurusnetwork gadget that i used almost weekly...

reitsma

JimFury
Neurotic (0) Inmate
Newly admitted

From:
Insane since: May 2005

posted posted 05-08-2005 09:36

Hello, I am new here, and well I first want to thank the person that put up the window.open info. I am trying to use it in conjunction with my images page in my site. The problem I am running into is that, I click on a thumbnail, and the image opens beautifully. If, however, I do not close my Popup the next pic populates in the same window. The problem more specifically is that the sizes of my images range from a horizontal to a vertical view, so I am getting distorted images.

Please Help.

Thank you.

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 05-08-2005 14:13

not sure why the next image is being populated if not closed. Maybe a peek at the code will help that. As for the other problem, use the following code from our very own Bugimus :

code:
/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Written by Bugimus
Copyright © 1998-2001 Bugimus, all rights reserved.
You may use this code for your own *personal* use provided you leave this comment block intact.
A link back to Bugimus' page would be much appreciated.
http://bugimus.com/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */

function showPic( imgName, imgCaption, imgWidth, imgHeight, textColor, bgColor ) {
if(textColor=="")textColor="#000000"
if(bgColor=="")bgColor="#ffffff"
if(imgWidth<=100)imgWidth=100
if(imgHeight<=100)imgHeight=100
winHeight=imgHeight+20;
w = window.open('','Demo','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,copyhistory=no,width='+imgWidth+',height='+winHeight);
w.document.write( "<html><head><title>"+imgCaption+"</title>" );
w.document.write( "<STYLE TYPE='text/css'>" );
w.document.write( "A {font-family: verdana; font-size: 10px; color: "+textColor+"; text-decoration : none;}" );
w.document.write( "A:Visited {font-family: verdana;font-size: 10px; color: "+textColor+"; }" );
w.document.write( "A:Active { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
w.document.write( "A:Hover { font-family: verdana; font-size: 10px; color: "+textColor+"; }" );
w.document.write( "IMG {border-color : "+textColor+";}" );
w.document.write( "BODY { font-family: verdana; font-size : 10px; font-weight: normal; color : "+textColor+"; background-color : "+bgColor+"; }" );
w.document.write( "</STYLE>" );
w.document.write( "<script language='JavaScript'>\n");
w.document.write( "IE5=NN4=NN6=false\n");
w.document.write( "if(document.all)IE5=true\n");
w.document.write( "else if(document.layers)NN4=true\n");
w.document.write( "else if(document.getElementById)NN6=true\n");
w.document.write( "function autoSize() {\n");
w.document.write( " if(IE5) self.resizeTo(document.images[0].width+10,document.images[0].height+31+20)\n");
w.document.write( " else if(NN6) self.sizeToContent()\n");
w.document.write( " else top.window.resizeTo(document.images[0].width,document.images[0].height+20)\n");
w.document.write( " self.focus()\n");
w.document.write( "}\n");
w.document.write( "</script>\n");
w.document.write( "</head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 onLoad=" );
w.document.write( "'javascript:autoSize();'>" );
w.document.write( "<table cellpadding=0 cellspacing=0 border=0><tr><td colspan=3><img src='"+imgName+"' border=0 alt='"+imgCaption+"'></td></tr>" );
w.document.write( "<tr><td align='left'>&nbsp;&nbsp;<a>&copy; Bugimus.com</a></td>" );
w.document.write( "<td align='center'><a>(ctrl-p to print)</a></td>" );
w.document.write( "<td align='right'><a href='javascript:top.window.close();'>close window</a>&nbsp;&nbsp;</td></tr>" );
w.document.write( "</table></body></html>" );
w.document.close();
}



Later,

C:\

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 05-08-2005 16:54

Here's an idea: just link _without_ a target to a page with your content positioned however you like (_without_ pixel-based dimensions).

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 05-08-2005 22:11

you'll need to replace 'popupwindow' with '_blank' - which means 'a new window every time' for the behaviour you want.

otherwise: welcome to the asylum. Please make sure to read the ->faq and ->aboutUBB to learn how to make the most of this place.

JimFury
Obsessive-Compulsive (I) Inmate

From: The padded room on the left.
Insane since: May 2005

posted posted 05-09-2005 08:26

The target="_blank" is what I think you mean, and yes I could do that, I was just shooting for a something flashy in that each pic has a window that fits the image to the T. Instead of a big blank window with the image shoved up to the top left.

I will put up a link soon when I have more of what I am looking to do.

Thank you for the info..

And to the gent that put up all that code, WOW that's awesome.. I will have to take a closer look at that and decode it I think I get the just of it. You
are defining window open as w, then specifying what w does when opened, how it acts, and looks. Very nice. I will let you know what i find out. thx.

Java is still very new to me.

Thank You!!

Does it come in an IV?

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 05-09-2005 12:54
quote:
I was just shooting for a something flashy in that each pic has a window that fits the image to the T



It's actually JavaScript and that's what the code I posted does. Fits the image to the window to a T.

gives you room for a title and Bug's copyright too.

Later,

C:\

conqueror
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Feb 2007

posted posted 02-04-2007 14:27

Hi everyone !

&#305;t seems really a great forum . i hope i'll find an answer ...

i have a problem about Frames ... im designed a webpage includes 2 frame ( left - right ). Left frame has a scrollbar and right one has not. is there any possible way for taking the scrollbar of left frame to the right

thanks everyone !

Moon Shadow
Paranoid (IV) Inmate

From: Paris, France
Insane since: Jan 2003

posted posted 02-04-2007 14:43

If I remember well - it's been a long, long time I've not used frames -, you should to use the atttribute scrolling="yes" (or auto) in your frameset.

However, frames really are an outdated way to design html pages and quite frankly you should not use them anymore. Try using CSS instead

----
If wishes were fishes, we'd all cast nets.



(Edited by Moon Shadow on 02-04-2007 14:45)

conqueror
Obsessive-Compulsive (I) Inmate

From:
Insane since: Feb 2007

posted posted 02-04-2007 15:38

thank u moon shadow !

but it doesnot solves my problem . i want to control left frame with a scollbar which takes place at
the "rightest !" side of the browser . i dont need scrollbar for right frame . but i need a scrollbar which take
place at the right , and it will controll the left frame ... i know its not easy ...

im still thrust u !!

(Edited by conqueror on 02-04-2007 15:40)

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 02-04-2007 17:09

conqueror: Hello and welcome to the Asylum,

Bringing the scrollbar of the left frame to the right hand side is really easy. Merge the two damn frames.

Sorry. I can only second Moon Shadow. By using frames you created yourself a problem you wouldn't have had you used the right tools to design your site. Frames are a biiiiiiiig NO-NO. No for accessibility, usability, SEO, ... If you don't buy that, try to browse your site on a mobile phone or in a text browser, bookmark or even print a page.



(Edited by poi on 02-04-2007 17:59)

adolfainsley8
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Apr 2016

posted posted 04-19-2016 13:14

i have a problem about Frames ... im designed a webpage includes 2 frame ( left - right ). Left frame has a scrollbar and right one has not. is there any possible way for taking the scrollbar of left frame to the right ????



waleeed



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu