Forums
This topic is locked
New photo upon browser refresh
Replies
Replied 31 Jan 2005 15:34:53
31 Jan 2005 15:34:53 Simon Martin replied:
Do you want an Ad Rotator type thing which counts the number of times the photo has been displayed or just something that displays a random photo each time the page is displayed?
Live the life you love
Love the life you live
Simon
Live the life you love
Love the life you live
Simon
Replied 31 Jan 2005 21:25:13
31 Jan 2005 21:25:13 Chris Charlton replied:
If you mean "pre-load" images, then you should just try Macromedia's preload <i>Behavior</i>. It'll add JS (JavaScript) to the <i>onLoad</i> event of your <body> tag. If you can't find it, trick DW by putting a fake "Swap Image RollOver" <i>Behavior</i> and you'll see the function/code for preloading, then just edit as you wish.
... If that was what you were asking for.
As for random photo displaying on refresh/loading...that's in JavaScript or Server-Side code (PHP,ASP,etc). You can find a few dozen of these samples all over the web, just Google "random image JavaScript" or something like that. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
... If that was what you were asking for.
As for random photo displaying on refresh/loading...that's in JavaScript or Server-Side code (PHP,ASP,etc). You can find a few dozen of these samples all over the web, just Google "random image JavaScript" or something like that. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 01 Feb 2005 03:55:15
01 Feb 2005 03:55:15 Julie Ray replied:
Simon martin
I want a random photo each time the page is displayed. Got anything for that?
I want a random photo each time the page is displayed. Got anything for that?
Replied 01 Feb 2005 10:04:49
01 Feb 2005 10:04:49 Chris Charlton replied:
Since I'm not sure what <i>Server Model</i> language you want to use, check out Macromedia's Exchange (www.macromedia.com/exchange/) and search for "random image" and you will see an extension for every lanugage (JS, ASP, PHP, etc.)
Replied 01 Feb 2005 12:17:41
01 Feb 2005 12:17:41 Simon Martin replied:
Ok, I'm <b>assuming</b> you're using ASP, I've not used any extension for randomising the image - though now Chris mentions it...
There's a script on this page authors.aspalliance.com/brettb/RandomImageSelector.asp that you can use to randomise your images. If you want to use random images on more than 1 page then I'd suggest you use includes so you don't have to copy it into all your pages.
Check out both parts of this article - www.4guysfromrolla.com/webtech/010301-1.shtml and www.4guysfromrolla.com/webtech/010301-1.2.shtml just in case you wanna go down the rotation route at a later date.
Live the life you love
Love the life you live
Simon
Edited by - ganseki on 01 Feb 2005 12:18:03
There's a script on this page authors.aspalliance.com/brettb/RandomImageSelector.asp that you can use to randomise your images. If you want to use random images on more than 1 page then I'd suggest you use includes so you don't have to copy it into all your pages.
Check out both parts of this article - www.4guysfromrolla.com/webtech/010301-1.shtml and www.4guysfromrolla.com/webtech/010301-1.2.shtml just in case you wanna go down the rotation route at a later date.
Live the life you love
Love the life you live
Simon
Edited by - ganseki on 01 Feb 2005 12:18:03