Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Smaller Browser Window 2

Status
Not open for further replies.

DoctorFox

Programmer
May 15, 2001
12
GB
Being a relative novice of Dreamweaver on the whole, I am looking for a bit of guidance on this one. I'm looking to create a link from within my own site to display a daily weather update from an exterior site but want to reduce the browser size so that it doesn't open up another full page. The original link appears as a small "pop-up" window. Is there a simple addition I can make to the HTML to acheive this style of browser window or is it more complicated than that?
 
DoctorFox,
What you might try and do if I understand you correctly is use the behavior. Open in new window which can be found by pressing shift+f3 this should bring up the behaviors window or just use window>Behaviors in there select the plus sign on the top right of the behaviors window. then go down and click open browser window then you can set the parameters from within there. Make sure that the link is highlited when doing this.

Nunzio 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Cheers Nunzio for your speedy response, just had a go and it worked first time. Fantastic. A couple of other questions on the same topic that have arisen:- A)If I attached this behaviour to some text and I want it to stand out as per my other links (underlined and blue), do I have to amend the HTML manually as it doesn't seem to apply this automatically? B) Can this type of behaviour be attached to a Flash Button? I've tried but it doesn't seem to work. Hope you can answer these two as they will be really helpful tools in the future.
 
DoctorFox,
Your welcome first of all. Now on to the questions. A) you should be able to add the link in the Open Browser Behavior. I think but I am not quite sure that it does create the Blue underlined txt and everything. Let me check on that and get back to you on a better way. B) there is a way to create the open browser in flash. It is long so please bare with me.
(1)
First we need the JavaScript. If you're not familiar with JavaScript, just visit Colin Moocks site at That's where the following script was obtained:


<!--
Popup Window
Version 2.0
Last Updated: May 7, 1999
Code maintained at: Copy permission granted for non-commercial uses. Written by Colin Moock.-->
<SCRIPT LANGUAGE=&quot;JavaScript&quot;> var javascript_version = 1.0; </SCRIPT>
<SCRIPT LANGUAGE=&quot;JavaScript1.1&quot;> javascript_version = 1.1; </SCRIPT>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
var newwin;
function launchwin(winurl,winname,winfeatures)
{
//This launches a new window and then
//focuses it if window.focus() is supported.
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version> 1.0)
{
//delay a bit here because IE4 encounters errors
//when trying to focus a recently opened window
setTimeout('newwin.focus();',250);
}
}
</SCRIPT>
(2)
Insert the code (from the last page) into the <HEAD> tags of your HTML document. Now all you really have left to do is assign the parameters of this new window to your Flash button. Here's the code:

On (Release)
//This is to change the size of the window
Get URL (&quot;javascript:launchwin('open.html' , 'newwindow' , 'height=800,width=600')&quot;)
End On

All this is doing is calling the javascript function launchwin, which does all of the work to open and size your new window. It then sticks the specified URL in that window. Of course, you can replace the address with any URL you please. Just remember to make it an absolute link ( if you're linking to an external page. In this case, I link to a relative page so I simply use &quot;open.html&quot;. Very simple, very useful. Enjoy!


If this doesn't work just respond and I will send you the link that I recieved it from.

Nunzio
10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
DoctorFox,
I looked through Dreamweaver and it seems that the easiest way to add a link is directly through the Open Browser Window.

Nunzio 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Nunzio, tried the Javascript you posted but it didn't seem to work. I would be grateful if you could give me anymore pointers as to how I can get this effect to happen.

Cheers,

DoctorFox
 
DoctorFox,
Try going to and searching for open new browser window. that is where I managed to get the Java Script from. If you don't find it there I will repost another one up in about 24 hours.

Nunzio 10101010101010101010101010100001
If you code it I will crash it.
10101000100101001111000100100010
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top