Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   open new window (http://www.velocityreviews.com/forums/t164271-open-new-window.html)

groovetherapy@2ser.com 02-19-2006 02:24 AM

open new window
 
Hi,

I am creating my web page so that if you click on a picture, it opens
up a new window. Pretty easy stuff - but the problem is that it doesn't
open up a new window with every pic. Instead it just replaces the
image.

How can I ensure a new window is opened up everytime.

here is my code (am I missing something?)..

<a href="#" target="_top"
onClick="MyWindow=window.open('http://www.groovetherapy.com.au/images/label_scans/calbido.jpg','MyWindow','toolbar=no,location=no,di rectories=no,status=no,menubar=no,scrollbars=no,re sizable=no,width=600,height=565');
return false;"><img
src="http://www.groovetherapy.com.au/images/small_scans/calbido_sml.jpg"></a>


...and you can check out the page here:

http://www.groovetherapy.com.au/archive.htm


BootNic 02-19-2006 02:41 AM

Re: open new window
 
> "groovetherapy@2ser.com" <groovetherapy@2ser.com> wrote:
> news:1140315880.464509.15310@f14g2000cwb.googlegro ups.com....
>
> Hi,
>
> I am creating my web page so that if you click on a picture, it
> opens up a new window. Pretty easy stuff - but the problem is that
> it doesn't open up a new window with every pic. Instead it just
> replaces the image.
>
> How can I ensure a new window is opened up everytime.
>
> here is my code (am I missing something?)..
>

[snip]
>
> ..and you can check out the page here:
>

[snip]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
var MyWindow;
function pop(x){
MyWindow=window.open(x.href,x.target,'width=600,he ight=565')
}
</script>
<title></title>
</head>
<body>
<a href=
"http://www.groovetherapy.com.au/images/label_scans/calbido.jpg"
target="_blank" onclick="pop(this);return false;"><img src=
"http://www.groovetherapy.com.au/images/small_scans/calbido_sml.jpg">
</a>
</body>
</html>

--
BootNic Saturday, February 18, 2006 9:39 PM

Wife who put husband in doghouse soon find him in cat house.
*Ancient Chinese Proverbs*


Ed Mullen 02-19-2006 02:56 AM

Re: open new window
 
groovetherapy@2ser.com wrote:
> Hi,
>
> I am creating my web page so that if you click on a picture, it opens
> up a new window. Pretty easy stuff - but the problem is that it doesn't
> open up a new window with every pic. Instead it just replaces the
> image.
>
> How can I ensure a new window is opened up everytime.
>
> here is my code (am I missing something?)..
>
> <a href="#" target="_top"
> onClick="MyWindow=window.open('http://www.groovetherapy.com.au/images/label_scans/calbido.jpg','MyWindow','toolbar=no,location=no,di rectories=no,status=no,menubar=no,scrollbars=no,re sizable=no,width=600,height=565');
> return false;"><img
> src="http://www.groovetherapy.com.au/images/small_scans/calbido_sml.jpg"></a>
>
>
> ..and you can check out the page here:
>
> http://www.groovetherapy.com.au/archive.htm
>


FYI, my browser is set to NEVER open a new window. It will always open
a new tab instead. Trying to force visitors to do what you want is
probably not a polite thing, and many people will be either confused by
it or very ticked off.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net

dorayme 02-19-2006 03:17 AM

Re: open new window
 
In article
<1140315880.464509.15310@f14g2000cwb.googlegroups. com>,
groovetherapy@2ser.com wrote:

> ..and you can check out the page here:
>
> http://www.groovetherapy.com.au/archive.htm


page not found.

--
dorayme

Jose 02-19-2006 04:32 AM

Re: open new window
 
> How can I ensure a new window is opened up everytime.

Are you =really= sure that the user wants this behavior without
recourse? Each new window uses resources. Some users don't have much.

Let the user choose.

Jose
--
Money: what you need when you run out of brains.
for Email, make the obvious change in the address.

groovetherapy@2ser.com 02-19-2006 10:26 AM

Re: open new window
 
Thanks for all the quick responses. Some very valid points brought up
that I had not considered (I'm pretty new to all of this).

my above link was incorrect - here is the correct one..

http://www.groovetherapy.com.au/archive.html

as you will see - I have some smaller images (record covers) and I
wanted the user to be able to click on each image, and a new window
with an enlarged image appears.

...you will have to forgive the state of my webpage at the moment. It is
still in progress and not online for general viewing yet.

cheers


groovetherapy@2ser.com 02-19-2006 10:35 AM

Re: open new window
 
Ok - I tried the java script that was posted above - it works, but
still doesn't open up individual windows. It seems to do exactly the
same as the original html code I posted above. What exactly does this
Java script do that is any different? Are there any advantages to using
script instead?


<script type="text/javascript">
var MyWindow;
function pop(x){
MyWindow=window.open(x.href,x.target,'width=600,he ight=565')


}


</script>
<title></title>
</head>
<body>
<a href=
"http://www.groovetherapy.com.au/images/label_scans/calbido.jpg"
target="_blank" onclick="pop(this);return false;"><img src=
"http://www.groovetherapy.com.au/images/small_scans/calbido_sml.jpg">
</a>


BootNic 02-19-2006 05:58 PM

Re: open new window
 
> "groovetherapy@2ser.com" <groovetherapy@2ser.com> wrote:
> news:1140345342.258952.83140@f14g2000cwb.googlegro ups.com....
>
> Ok - I tried the java script that was posted above - it works, but
> still doesn't open up individual windows. It seems to do exactly the
> same as the original html code I posted above. What exactly does
> this Java script do that is any different? Are there any advantages
> to using script instead?
>

[snip]

The link will work and do something useful IF javascript is disabled.

All of it depends on user settings. It is questionable on what the results
will be.

In FireFox 0.8.0+ it opens a new window that is 600 X 595 each time
its clicked.

In Mozilla 1.7.12 it opens a new window that is 600 X 595 each time
its clicked.

In IE 6 it opens a new window that is the same size of the opener
window each time its clicked.

In Opera 8.52 it opens a new tab each time its clicked.

Each one is doing what I have it set to do.

Each one I can also click on the link and choose how I want it opened.

I have no way of knowing what filters/popup blockers you may have,
what your settings are, what browser you are using.

I do not see any advantages to using javascript in this example, if
anything I think its a disadvantage.

I think the best choice would be to use

<a href=
"http://www.groovetherapy.com.au/images/label_scans/calbido.jpg"
img src=
"http://www.groovetherapy.com.au/images/small_scans/calbido_sml.jpg">
</a>

without the javascript and without the target.

--
BootNic Sunday, February 19, 2006 12:57 PM

Facts do not cease to exist because they are ignored.
*Aldous Huxley *


=?ISO-8859-1?Q?G=E9rard_Talbot?= 02-20-2006 06:42 PM

Re: open new window
 
groovetherapy@2ser.com wrote :
> Thanks for all the quick responses. Some very valid points brought up
> that I had not considered (I'm pretty new to all of this).
>
> my above link was incorrect - here is the correct one..
>
> http://www.groovetherapy.com.au/archive.html


What you do is difficult to understand and to justify.

toolbar=no,location=no,directories=no,status=no,me nubar=no,scrollbars=no,resizable=no,width=600,heig ht=565

You want, say, 4 images to be loaded in new, individual, distinct,
separate created windows and not be reusing, recycling in an already
opened secondary window. The user can choose to do that if the code of
your link does not interfere with his browser settings. Also, note that
90% or so of people on the web have a scr. res. smaller than 1200 x 600:
so, right there, the user can not have more than 2 windows side by side.

Finally, your window features are trying to remove basic fundamental
accessibility window features (scrollbars=no,resizable=no) and, at the
same time, remove window features which browser manufacturers are now
ensuring/forcing their rendering (location=no,status=no): so what you do
goes against the users' best interests and, indirectly, against your
best interests.
Your window sizing requests will be fooled more often then honored.

DOM:window.open()
Usability issues
http://developer.mozilla.org/en/docs...ability_issues

Gérard
--
remove blah to email me


All times are GMT. The time now is 04:41 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.