Click to See Complete Forum and Search --> : Open full browser window from button


pulley88
04-18-2007, 06:11 AM
Hi,

I have also listed this in Javascript as not sure where problem is

I hope someone can help a newbie, I am creating a small website that will be used for viewing flash videos.

The plan is to have the first page (main menu) with a list of buttons/links so that when a button/link is clicked it will open another webpage with the selected flash video.

I need the page(s) with the flash video to open full screen (I know people do not like this, sorry).

I have have created the main page with the buttons/links and used some code found on this site to put a script into the header so that when I click one of the buttons/links on the main menu page it will open up another page in full screen and run the flash video.

The code I have used is:
<script>
<!--
window.open("trainingflash.html","fs","fullscreen,scrollbars")
//-->
</script>

This script works and opens the page in full screen but the problem I have is if I click any button on the page it takes me to the same "trainingflash.html" page listed in the script, irrelevant of the link (href) I have set the button to.

The code I have for the buttons are:
<form>
<a href="xxxxxxxxxxx.html">
<input type="button" onClick="fullwin()" value="test window">
</a>
</form>

does anyone know what code I should be using or the parameter I should be using in the scripts to open the link the button is set to in full screen?

Any advice regarding this issue would be appreciated.

Regards

ryanbutler
04-18-2007, 09:18 AM
The reason every button is opening the same file is because you pass the same URL/file inside the function. You either need to pass URL where training.html or do this:

<html>
<head>
<title></title>
<script language="JavaScript">
function openWindow(URL,windowName,windowFeatures){

newWindow=window.open(URL,windowName,windowFeatures)
}
</script>
</head>

<body>


<a href="javascript:openWindow('http://www.google.com','windowName','scrollbar=yes,width=800,height=600')">Click me</a>

</body>
</html>

pulley88
04-18-2007, 09:47 AM
Thanks for your help.