View Full Version : Java OpenNewWindow from html doc
russsty
02-04-2003, 03:46 PM
I want to open a POP up window from my homepage, the pop up is my site which has been created in flash. I have tried using the OpenWindow script but I dont know which file this should link to?
Can you help?
catbert303
02-04-2003, 03:55 PM
in between the opening and closing head tags of the html page add the openWindow function,
<script type="text/javascript">
<!--
function openWindow(url, name, config) {
newWindow = window.open(url, name, config);
}
//-->
</script>
then from your flash movie (embedded in this page) you can use
getURL("javascript:openWindow('filename.html','newWin','wi dth=500,height=400');");
or from an html link in the page
<a href="javascript:openWindow('filename.html','newWin','wi dth=500,height=400');">open the window</a>
maybe this tutorial will help you:
http://www.actionscripts.org/tutorials/beginner/spawn_browser/index.shtml
or this one:
http://www.actionscripts.org/tutorials/beginner/PopUp_window_within_flash/index.shtml
freddycodes
02-04-2003, 04:42 PM
Incidentally since I am so anal retentive,
Java OpenNewWindow from html doc
Javascript is not Java, they are two totally different things. Java is a full blown programming language. Javascript is a client side scripting language.;)
russsty
02-04-2003, 05:14 PM
thanks, but I dont want to embed any swf in the html page, I want to have a link from the html-only page that opens up a flash.swf that sits on my ISP server. I want have a html-only page so everyone cam access this, and then download flash player if neccessary, then finally enyer the site.
does this make sense?
ta!
catbert303
02-04-2003, 08:56 PM
Originally posted by catbert303
in between the opening and closing head tags of the html page add the openWindow function,
<script type="text/javascript">
<!--
function openWindow(url, name, config) {
newWindow = window.open(url, name, config);
}
//-->
</script>
or from an html link in the page
<a href="javascript:openWindow('filename.html','newWin','wi dth=500,height=400');">open the window</a>
You can use that code to make the link from a plain html page. the page filename.html (or whatever you chose to call it) would contain your swf file.
russsty
02-07-2003, 12:12 PM
OK, sorry, but I not getting this.
I have a html link through an image map coord to open 'port.html' from'index.html', and in 'port.html' I have an 'swf' embedded and I want this to open as a featureless window, ie. no scrollbars/menu etc and set the width and height attributes.
But where do i place my javascript you mentioned?
Does it go on on 'index.html' or 'port.html'?
ta,
rusty
catbert303
02-07-2003, 11:53 PM
the function gets placed in between the head tags on the page port.html and the call to the function would go in the href attribute of the image map region.
href="javascript:openWindow('index.html','newWin','width =500,height=400');">
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.