logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12-07-2005, 12:26 AM   #1
bolloscript
 
Join Date: Dec 2005
Posts: 15
Default

Hi,
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]
__________________
"When the power of love overcomes the love of power, the world will know peace" - Jimi Hendrix
bolloscript is offline   Reply With Quote
Old 12-07-2005, 09:29 AM   #2
Taz69
 
Join Date: Sep 2005
Posts: 25
Default

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

Taz
Taz69 is offline   Reply With Quote
Old 12-07-2005, 11:14 AM   #3
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

are you talking about position?

do you want the window to popup at a location you choose
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 12-07-2005, 11:25 AM   #4
bolloscript
 
Join Date: Dec 2005
Posts: 15
Default

Quote:
Originally Posted by davidj
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.
__________________
"When the power of love overcomes the love of power, the world will know peace" - Jimi Hendrix
bolloscript is offline   Reply With Quote
Old 12-07-2005, 11:42 AM   #5
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

ok

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

Code:
//tmtC_winOpen
var newWin;
//tmtC_winOpenEnd

function tmt_winOpen(u,id,f,df){
	if(eval(id)==null||eval(id+".closed")){
	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

Code:
<a href="javascript:tmt_winOpen(yourpage.html','newWin','width=400,height=400,left=300,top=200,
toolbar=yes,menubar=yes,location=yes,scrollbars=yes,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
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 12-07-2005, 11:52 AM   #6
bolloscript
 
Join Date: Dec 2005
Posts: 15
Default

Ok, I'm at work atm so I will try that when I get home.
Thanks again mate, you're an absolute wizzard!
__________________
"When the power of love overcomes the love of power, the world will know peace" - Jimi Hendrix
bolloscript is offline   Reply With Quote
Old 12-07-2005, 12:01 PM   #7
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

Quote:
you're an absolute wizzard
i know
but nobody has shown any appreciation by buying me
this
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 12-07-2005, 05:54 PM   #8
Creative Insanity
Banned
Creative Insanity's Avatar
 
Join Date: Oct 2005
Location: KiwiLand (stalk that far dj LOL)
Posts: 1,967
Default

You sure that is all you want dj? You would not like a car to go along with it would you LOL
Creative Insanity is offline   Reply With Quote
Old 12-07-2005, 06:08 PM   #9
bolloscript
 
Join Date: Dec 2005
Posts: 15
Default

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
__________________
"When the power of love overcomes the love of power, the world will know peace" - Jimi Hendrix
bolloscript is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 03:43 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com