Using GetRandomImageFromFolder()

images/fox_sheep.jpg

Contents of default.asp :
<!-- The includefile is one level back from the "default.asp" file: -->
<!--#include file ="../../jakes_IO.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="da">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Example use of the GetRandomImageFromFolder function</title>
    <link rel="stylesheet" type="text/css" href="/jake.css">
</head>
<body>
    <div align="center"><h1>Using GetRandomImageFromFolder()</h1></div>

    <!-- ***************    HERE IS WHERE IT HAPPENS!!     ****************** -->
    <% dim imagename
    imagename = GetRandomImageFromFolder("images")%>
    <h3 style="display:block;border:1px solid red;background:yellow;padding:10px;"><%=imagename%></h3>    
    <img style="border:1px solid black;" src="<%=imagename%>">
    <p><button onclick="window.location.reload();">Reload page</button>    
    <!-- ********************************************************************** -->

    <p><b>Contents of default.asp :</b><br>
    <span class="source">
    <% response.write(stringToHTML (GetFileContents("default.asp")))%>
    </span>
    
</body>
</html>