View Full Version : Smaller window off main page

12-06-2005, 11:26 PM
I created a new browser window from the behaviour panel in dw.

What I'm stuck on now, is that the new window goes straight to the top of the 'parent' page, which in turn scrolls immediately back to the top.

What I want is for the parent page to stay where it is, & the new small window to open next to the link.
The behaviour panel doesn't show me any options to do this.
Is there a function in dw to do this, or a tag I can use?

Thanks in advance :)

This is the code that dw wrote.

click here (#) to hear a sample [/b]

12-07-2005, 08:29 AM
when you set the behaviour, you need to adjust the target window to _blank not _parent this will open a new window for the link


12-07-2005, 10:14 AM
are you talking about position?

do you want the window to popup at a location you choose

12-07-2005, 10:25 AM
are you talking about position?

do you want the window to popup at a location you choose
Yes, and ideally I'd like the 'parent' page not to automatically scroll to the top.

12-07-2005, 10:42 AM

function.. Inside script tags in <head></head>

var newWin;

function tmt_winOpen(u,id,f,df){
eval(id+"=window.open('"+u+"','"+id+"','"+f+"')"); eval(id+".focus()");}
else if(df){eval(id+".focus()");}
else{eval(id+"=window.open('"+u+"','"+id+"','"+f+" ')");eval(id+".focus()");}

link should look like this

<a href="javascript:tmt_winOpen(yourpage.html','newWi n','width=400,height=400,left=300,top=200,
toolbar=yes,menubar=yes,location=yes,scrollbars=ye s,status=yes,
directories=yes,copyhistory=yes',1)" >link</a>

change values to suit
e.g top=200,left=300 are position of window
play around turning YES to NO to see what happens
change yourpage.html to what ever page you want

12-07-2005, 10:52 AM
Ok, I'm at work atm so I will try that when I get home.
Thanks again mate, you're an absolute wizzard! :D

12-07-2005, 11:01 AM
you're an absolute wizzard

i know
but nobody has shown any appreciation by buying me
this ('http://www.bang-olufsen.com/web2/systems/product.asp?section=systems&sub=ms&prodid=12')

Creative Insanity
12-07-2005, 04:54 PM
You sure that is all you want dj? You would not like a car to go along with it would you LOL

12-07-2005, 05:08 PM
I'm about to try this now, but Im a bit nervous that it will do what I want now cos I'll gonna be skint for Xmas :lol: