|
This is the JavaScript forum. Java and Javascript are entirely different programming languages, in spite of the confusingly similar names. Rather like Austria and Australia!
When posting here please help us to help you by following the posting guidelines and wrapping your code in CODE tags. This means use the octothorpe or # button on the toolbar. You can (and should) edit your previous post.
Do please read the posting guidelines regarding silly thread titles. The thread title is supposed to help people who have a similar problem in future. Yours is useless for this purpose. You can (and should) edit it to make it more meaningful.
Your code is antiquated in the extreme. document.layers went out with Netscape. eval() is considered as absolutely undesirable. document.write() is also obsolete. The code might have been acceptable in 2000. Not in 2013.
<script language=javascript> is long deprecated and obsolete. Use <script type = "text/javascript"> instead (in fact also deprecated but still necessary for IE<9).
In short, you ought to replace this ancient code with something more up-to-date. There is no point in trying to modify it. It may work now (in older browsers??), but it will not work in a few short years time.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
__________________
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Last edited by Philip M; 01-29-2013 at 06:36 PM..
|