Click to See Complete Forum and Search --> : New Windows opening for links


troyguy39
04-22-2003, 08:24 PM
I have a website with an index page at http://josephpolicastri.com

This index pages links open other windows to go forward to additional sites of mine also.

The new windows open properly...(Real Estate only so far)..

If you click on the real Estate Link, the site opens in a new window.

This site also has links, the exact same as the Index does, BUT the links don't open in their own window...

If I call up the real estate site on its own (without using the index page to get there) then it works properly...

So why dont these links work in what I will call sub-sites???

Any suggestions?

Thank you

Joe

DrDaMour
04-22-2003, 09:11 PM
all of your window.open("URL","myWindow","attribs");


the second parameter to window.open is the target frame name, since you use the same one every time, it will always target the same window. So you need to change that second parameter for each window you want to be openein new. using _Blank will open a new one no matter what.

troyguy39
04-22-2003, 09:19 PM
It's a little over my head being just an amateur at web site designing, but would that be added to the index page links only, the real estate links only, or every link in all the sites?

Thank for the reply too !!!

Joe

DrDaMour
04-22-2003, 09:26 PM
Think of it like this:

Every browser window has a target name. They get assigned by either the program, or by the user.


when you do window.open(URL,yourTarget,attribs) you are opening a window with the target name that you specify. So you need to decide which ones of these you want to change. If you do that, and a window with the target you specify already exists, then the page gets loaded in THAT window, not a new one. using taget="_Blank" is a special keyword that will open a new window no matter how many windows are open

troyguy39
04-22-2003, 10:04 PM
This is the link I tested in the real estate site.... It opened the link, but not in a new window...It just worked thje same

onClick="window.open('http://groups.yahoo.com/group/josephpolicastri/','mywindow','width=900,height=575,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,s crollbars=yes,copyhistory=yes,resizable=yes');TARGET=_blank"

I replaced the 'mywindow' with the target=_blank, also, that didnt work either

I added ;target=_blank only...the " belongs at the end of the original link

so i guess the ? is where exactly do i put that target statement

DrDaMour
04-22-2003, 10:09 PM
no, the second parameter IS the target statement

so

window.open(URL,"_blank",attribs);

troyguy39
04-22-2003, 10:16 PM
Ahhhh...Thank you...

So, all I had to do is replace 'mywindow' with another name, such as '_blank'

That worked.

Thank you...and Ill be sure to visit that java site