on Load/Unload select array[element]

admin

Administrator
Staff member
hallo

i have several form websites. the data of these forms get stored in a external text file via the following php script.
now my javascript problem: after i have stored the data of form[0] i would like to go to form[1], then to form[3] and so on form[8].
is it possible with onLoad onUnload events to select one element after another from the array and to go to the corresponding websites ( m1.html to exit.html ) ??

thanks, simon baumgartner

<html>
<head>
<title>Untitled</title>
<script language="javascript" type="text/javascript">
// List

var a= 0
var form = new Array();
form[0]="../m1.html";
form[1]="../m2.html";
form[2]="../m3.html";
form[3]="../m4.html";
form[4]="../m5.html";
form[5]="../m6.html";
form[6]="../m7.html";
form[7]="../m8.html";
form[8]="../exit.html";

window.location=foto[a];
</script>
</head>
<body onLoad=a++>
<?PHP
$FileName="daten/data.txt";
$FilePointer= fopen ($FileName,"a");
fwrite ($FilePointer,"s $Stimulus\tr $s1v\r");
fclose ($FilePointer);
?>
</body>
</html>
 
Back
Top