Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > open new window

Reply
Thread Tools

open new window

 
 
groovetherapy@2ser.com
Guest
Posts: n/a
 
      02-19-2006
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

 
Reply With Quote
 
 
 
 
BootNic
Guest
Posts: n/a
 
      02-19-2006
> "" <> wrote:
> news: 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*

 
Reply With Quote
 
 
 
 
Ed Mullen
Guest
Posts: n/a
 
      02-19-2006
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
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      02-19-2006
In article
<. com>,
wrote:

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


page not found.

--
dorayme
 
Reply With Quote
 
Jose
Guest
Posts: n/a
 
      02-19-2006
> 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.
 
Reply With Quote
 
groovetherapy@2ser.com
Guest
Posts: n/a
 
      02-19-2006
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

 
Reply With Quote
 
groovetherapy@2ser.com
Guest
Posts: n/a
 
      02-19-2006
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>

 
Reply With Quote
 
BootNic
Guest
Posts: n/a
 
      02-19-2006
> "" <> wrote:
> news: 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 *

 
Reply With Quote
 
=?ISO-8859-1?Q?G=E9rard_Talbot?=
Guest
Posts: n/a
 
      02-20-2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Window.Open get new tab instead of new window in FireFox Fredzidd@gmail.com Javascript 1 02-29-2008 03:06 AM
window.open() doesn't open new Window in Opera PC HUA Javascript 2 05-19-2004 02:29 AM
Need to open a new browser window, not a new window Gordon ASP General 3 04-16-2004 10:46 PM
Re: open window a new window and retrieve data from it. C# Cheryl ASP .Net 2 11-13-2003 11:07 AM
open window a new window and retrieve data from it. C# Cheryl ASP .Net 2 11-12-2003 05:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57