CodeAve.com CodeAve.com - ASP - Random Functions
ASP
·Read/Write
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·Articles
·Miscellaneous
·Contents
·What's New?
JavaScript
CSS
HTML
Maps
Links
Mail List
Search
Sitemap


 


Random Images
Random images are great for making a page look unique from others in the same template. This script will call an .asp page from inside an image tag in .html. A random number between one and ten is chosen and the resultant image is the image contained in the corresponding array.
View the Output
Text View
Print View
Mail this Link
Download the Code

<% dim array(9)

randomize

array(1)="rdm1.gif"
array(2)="rdm2.gif"
array(3)="rdm3.gif"
array(4)="rdm4.gif"
array(5)="rdm5.gif"
array(6)="rdm6.gif"
array(7)="rdm7.gif"
array(8)="rdm8.gif"
array(9)="rdm9.gif"
array(0)="rdm0.gif"

upperbound=ubound(array)
lowerbound=0
lrandom = Int((upperbound - lowerbound + 1) * rnd + lowerbound)
response.redirect "images/" & (Array(lrandom))
%>

 

 

 



ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3