Guest lildrumergrl Posted September 24, 2006 Share Posted September 24, 2006 I'm having a hard time figuring out how to make an image change everytime you open/refresh the page. for example everytime you open/refresh www.theacademyis.com the center picture changes to a different one. does anyone know hpw to do this? Link to comment Share on other sites More sharing options...
Skemcin Posted September 25, 2006 Share Posted September 25, 2006 if you are using a server side scripting language like Cold Fusion, it is as easy as this: <cfoutput><img src="_images/imagenumber_#randrange("10","19")#.gif" width="xxx" height="xxx" alt="xxxxxxxx" oncontextmenu="return(false);" /><br /></cfoutput> Where you would you have imagenumber_10.gif, imagenumber_11.gif, imagenumber_12.gif . . . in the _images folder.and probably similar in ASP and PHP.If you do not have access to server side technologies, then you will need to good the javascript way to do it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now