alanfoohokok 0 Newbie Poster

Hello,

Am a newbie... :>)

Hope someone with knowledge of using Javascript with Google Chrome can help me.

Below is the testing code which when clicking the onclick button supposed to display another web page and STAY THERE.

It works with Internet Explorer but does not work with Google Chrome.

I have to use "alert" to stop the page from disappearing in Google Chrome.

When I took off the "<Form> and </form> both work.

How can I use the <Form> and </form> and make it work in Google Chrome?

I have another larger program using

e.g.
<FORM name=cloze>

elementname=document.cloze.elements[i+3].name;
...etc
</Form>
Without the <FORM name-cloze> my scripts do not work.

Thanks in advance.

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<FORM >

<body>
<SCRIPT language=javascript>
var student ="alan"
var finalmarks= 90;
var TotalOriMarks  = 100;
var foldername="testing\okay"
var Savefile ="test.htm"

function checkanswers()
{
document.write("<html>");
document.write("<HR><HEAD><TITLE>Test Results for  PRIARevi8.eng >Eng PRI ARevi8.lis> </TITLE></HEAD>\n");
document.write("<BODY bgcolor=#FFFFCC><h2>Test results for(Ujian untuk) :<font color=#0000FF>: " + student + "</font></h2>\n");
document.write("<h2>Name of test (Nama): <font color=#0000FF> PRIARevi8.eng >Eng PRI ARevi8.lis> </font></h2>\n");
document.write("<h2>Your marks(markah):<font color=#0000FF> <b>"+ finalmarks+"</font> out of  <font color=#0000FF>"+TotalOriMarks +"</font> saved to file :<font color=#0000FF>"+foldername+"\\"+Savefile +"</font></b><hr></h2>");
document.write("<table bgcolor=#F1FED align=center border=3>\n");
alert(" pause");

}
</SCRIPT>
<INPUT onclick=checkanswers() type=submit value="Click here to check answers" name=B1>
</FORM>

</body>
</head>


</html>