View Full Version : re link to new window using target_blank tag

08-04-2008, 06:57 PM
not wanting to use Javascript I like to set a link to a new window to open in a given position and size and without scrollbars or menu or toolbar - to do this I use the target_blank tag as follows:

<a href="newpageurl.htm"TARGET=_BLANK" onClick="window.open(this.href, 'popupwindow', 'width=900,height=600,left=50,top=0'); return false;">OPEN NEW WINDOW</a>

In IE6 it works a treat - by missing out the attributes: "scrollbars" and "resizable" from within the <a href ...> command - the new window opens just 'bare' - it has no bars other than the top title bar - there are no scrollbars and there is no bar at the bottom.

I would like the same to happen in FIREFOX. BUT NOT SO!

IN FIREFOX - there ALSO TURNS UP A BAR AT THE BOTTOM WITH THE RESIZE MARK IN RIGHT HAND SIDE AND with the word "done" in it in the left-hand side! Is it possible to get rid of this bottom bar in FIREFOX? If so, how is it done?

BTW - inserting "scrollbars=no" or "scrollbars=0", has no effect in FIREFOX!

Thanks in advance for help

08-05-2008, 02:42 AM
There is no target tag. It is an attribute. If you want to avoid javascript, you cannot use onclick - it is javascript.

The above is just clarification. Now, you cannot override the browser's settings. The default in FF is to not allow a new window that is not resizable.

Further, if you think about it, there is no way you can anticipate every possible situation on a given user's computer. Given that, if you create a new window that cannot be resized, and that has no scrollbars, the user may not be able to see its contents.

Generally no one will even attempt to resize or scroll a window if everything they need to see is visible. So you may as well allow them to have one or the other or both, just in case they need them.

08-05-2008, 09:34 AM
Many thanks for the clear explanation. Yes, as I wrote "no javascript", I thought how can that be with "onClick"? Never seen explanation why that and MouseOver work when there is no: <SCRIPT LANGUAGE="JavaScript"> or <script type="text/javascript"> entered.

I thought that the entry <SCRIPT LANGUAGE="JavaScript"> or <script type="text/javascript"> was essential for any Javascript commands to work?

As to my linked windows - yes I was ensuring all the window contents would be seen without any scrolling - I am working on the basis the people will have a screen 13" or larger. And the IE windows without the scrollbars/taskbar seem to me to be neater. I guess that's a sort of personal quirk and probably most people dont really notice if they can see what they want to see.

But thank you again for nice clear explanation and I'll do with what is and not with what I'd like.

08-05-2008, 09:54 AM
New windows are problematical for another reason - pop up blockers and controllers. Depending upon what exactly you are using them for there are various alternatives that use javascript and that can degrade well for non-javascript enabled browsers. For just showing an enlarged image for example, lightbox is a fairly good choice:


For pages, AJAX or Iframe used with a script that can create a DHTML pop up (not a true window, just a hidden element like the lightbox that will show on top of the current page) can work out well. See:


and an enhancement for it: