[ Play in New Window ]

Script to Open New Window

Sample Description
eA02SL window height70px 100px is the minimum height in some kind of browsers.
window height100px
window height130px 130px is only the height of the scene of the railroad. No space for the starting button. So button does not show and auto starting is on.
window height154px Full size of eA02SL (default scene size. It is able to change in eA02).
154px = railroad (130px) + button area (24px).
eM00SL window height96px Error!!
96px = train picture (60px) + button area (36px). If under this height, eM00SL checked "error".
(In some kind of browsers, 100px is the minimum height. In such a browser, not error)
window height97px This is the minimum height to show eM00SL.
But in the sample, rail is lifted up 38pixels. So 97px height is not enough....
window height135px 97px (minimum height) + 38px (lift-up pixels in the sample)
window height166px Full size of eM00SL.
166px = railroad (130px) + button area (36px).
eM02window height 280px 280px height is necessary to show eM02.

Source

Sample for eM02:
<script language="JavaScript" type="text/javascript"><!--
function openTrain(){
  scwidth=screen.width-40;
  window.open('eM02.html','trainRun','menubar=no,toolbar=no,directories=no,location=no,status=no,resizable=no,scrollbars=no,top=0,left=0,width='+scwidth+',height=280');
}
//--></script>


openTrain() ....name of function.
40 ...offset pixels between window width and screen width.
eM02.html ...file name.
trainRun ...window name. If eM02, "trainRun" is better.
280 ...window height

Button to open (HTML) :
<a href="#" onClick="openTrain();return false">OPEN</a>
or
<a href="javascript:openTrain()">OPEN</a>


<< Return

Opaku's Train Kit (C) Mr.Opaku