www.webdeveloper.com
Results 1 to 10 of 10

Thread: changing picture

  1. #1
    Join Date
    Mar 2003
    Posts
    7

    changing picture

    On some websites there is a picture on the homepage, or wherever, that changes each time you visit the site or refresh it on your browser. Could somebody please tell me how to do that or where I can go to learn. Thanks for reading this one and thanks in advance to anybody nice enough to answer.

  2. #2
    Join Date
    Mar 2003
    Location
    Escondido, CA
    Posts
    998
    That's going to be either JavaScript or some type of server-side language. Try hotscripts for a ready-made script. If that doesn't get you what you need, I'd post this message in one of the other forums. Maybe somebody there would be willing to put something together for you.

    Good luck.

  3. #3
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    do you want to track it by logging what image a user saw in a data base or use cookie? Or do you want to display a random image?

  4. #4
    Join Date
    Mar 2003
    Posts
    7
    I just want to generate a random image each time someone visits the site. For example, have a bunch of images stored and each time you hit refresh it randomly selects one.

  5. #5
    Join Date
    Oct 2003
    Location
    NC
    Posts
    9

    urgh

    you just need to search around, if you are signed up for angelfire, it can tell you how to do it...

    Go here:
    http://www.angelfire.com/super2/flash0

  6. #6
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Originally posted by madalo
    I just want to generate a random image each time someone visits the site. For example, have a bunch of images stored and each time you hit refresh it randomly selects one.
    I have a great asp.net ad rotator script that uses some xml to control the impressions. Let me test it and see if it works the way it is supposed to. If it works Ill show you the code. But until then do some reaserch on java script. You will probably be going for something like a random quote script but you can dynamically genorate the html. Do a forum search for rnd or random or something. Ill post back in this soon.

  7. #7
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    http://knights.europe.webmatrixhosti...adrotator.aspx
    Does this float your boat? You can modify how many times each image displayed relative to the total number of images displayed. Pretty much its an average. Its pretty neat I think. You can run something like this off of brinkster or something. Brinkster is a free host so its no biggie there. This is better then using java script because it gives you more control and it will work for all users, it wont leave 13% out like java script would. You can configre this application by modifying this file
    http://knights.europe.webmatrixhosti.../bannerads.xml
    its pretty stright forward what you change

  8. #8
    Join Date
    Mar 2003
    Posts
    7

    Thumbs up thanks!

    Thank you so much, PeOfEo. That looks like something that might work. I'll give it a shot tomorrow and try to configure it to the site I maintain. I really appreciate yours and everybody else's reply!

  9. #9
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    well you will need the source codes. I showed you the file... but the code is executed server side so I will need to give it to you. So let me upload these things. This is asp.net so you will need to be on a server that supports it so I suggest making an account at http://europe.webmatrixhosting.net or http://www.brinkster.com to host all of the ad rotator stuff and any other asp.net stuff. There is not much to modify, just the xml really and maybe some of the other stuff that displays with the ad is pretty straight forward too but I can help you modify that if you like. When you display this on your site I suggest you use an iframe.
    Attached Files Attached Files
    Last edited by PeOfEo; 10-01-2003 at 09:35 PM.

  10. #10
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    madalo, did you get it working the way you want it? Have you tested the scripts yet?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles