You are here: irt.org | FAQ | JavaScript | Object | Q1172 [ previous next ]
Try:
<script language="JavaScript"><!-- var myFiles = new Array('file1.htm','file2.htm','file3.htm'); var i = 0; //--></script> <form> <input type="text" name="files"> <input type="button" value="next" onClick="if (i<myFiles.length) this.form.files.value=myFiles[i++]"> </form>