I have a CBT that uses a javascript function to move forward or back through html pages with a numbering scheme; for example, 1.html, 2.html, 3.html….. How do I check to see if the html document exists before I try to display it?
@Warren86Sep 15.2004 — #Try this, just specify the path and file name:
<HTML>
<Head>
<Script Language=VBScript>
function checkExist()
set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists("ABC.txt") Then MsgBox "There is an ABC.txt on the desktop..." 'you can put the name of a JS function here Exit Function End If MsgBox "There is no ABC.txt on the desktop..." 'you can put the name of a JS function here