[cumbria_lug] Mozilla & JavaScript

cumbria@mailman.lug.org.uk cumbria at mailman.lug.org.uk
Thu May 8 21:32:01 2003


All,

On =
http://www.afnw35342.pwp.blueyonder.co.uk/holidays/new-york-2002.html#fri=
day-night, if you  click on the hotel link, what's supposed to happen is =
a JavaScript function creates a page to display. Mozilla doesn't wait to =
display it and go back  to the original page.

The function looks like this:

function DisplayImage( title, picture, alt_desc )
{
   document.write("<html>                                 ");
   document.write("    <head>                            ");
   document.write("        <title>    " + title + "    </title>        =
");
   document.write("    </head>                            ");
   document.write("    <body>                            ");
   document.write("        <center>                    ");
   document.write("            <h2>" + title + "</h2>            ");
   document.write("            <img    src=3D'./images/" + picture + =
".jpg'    ");
   document.write("                alt=3D'" + alt_desc + "'>        ");
   document.write("        </center>                    ");
   document.write("    </body>                            ");
   document.write("</html>                                ");
}

The JavaScript Console and Debugger isn't any help. Any ideas?

Cheers

Alex

--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
http://www.afleming.co.uk
http://www.gagoftheweek.com