Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

Image rotator js script

hello experts.please help me.
i need to write a js script..

What the script need to do?
For every unique user that enter site, script need to show different image on the site.
This images script will change only for a new ip that visit website :

Header, background and website buttons.
Images for background,header and buttons will be changer to other.This images are in directories background,header....

And, the image files are located in diferrent dirs look like this 1,2,3,4,5
Script need to load random image. Example : for first user sccript will load image from dir 2, for second user script will load image from dir 7.

Please help me. Thanks a lot.
500 point for this.
0
helyonprime96
Asked:
helyonprime96
  • 4
  • 3
  • 3
  • +1
2 Solutions
 
Beverley PortlockCommented:
Why write one? Why not use an exsiting one? Both MooTools and JQuery javascript frameworks support various forms of image rotator. Most of these only require a few lines of javascript

Mootools

http://speckyboy.com/2008/12/15/best-ever-65-mootools-plugins-and-demos-is-it-better-than-jquery/

JQuery

http://vandelaydesign.com/blog/web-development/jquery-image-galleries/

0
 
helyonprime96Author Commented:
i need a js script.
can you write a one simple?
0
 
Beverley PortlockCommented:
The links I provided above offer several options for image rotators / sliders. All they require you to do is install the javascript. For instance, this one http://www.php-help.ro/mootools-12-javascript-examples/slideitmoo-v11-image-slider/ shows how to install one of these sliders but simply installing this code

<script language="javascript" type="text/javascript" src="path_to_scripts/mootools-1.2.1-core.js"></script>
<script language="javascript" type="text/javascript" src="path_to_scripts/mootools-1.2-more.js"></script>
<script language="javascript" type="text/javascript" src="path_to_scripts/slideitmoo-1.1.js"></script>

puts most of the code in place for you. Then all you need is a bit of javascript and HTML samples of which are both given on the page. Other rotators will have a similar coding samples. Find the rotator that suits your needs and then look at its demo page where there will be code that shows you how to install it.

"can you write a one simple?"

There is nothing simple about image rotation so I would use one of these frameworks. Personally I find the MooTools framework is better for images and transistions so it would be my choice, but there's nothing wrong withJQuery.

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
BadotzCommented:
Is this homework?
0
 
Beverley PortlockCommented:
@Badotz - it might help if we clarify how EE works. The OP only just joined EE.

@helyonprime96 - At Experts Exchange (EE) we help you solve your own programming problems, we are not a coding bureau. If you have a programming problem we will either direct you towards a solution or, if you post your existing code here, we will look at it and tell you where it is going wrong - assuming we can find the problem. So whilst I have the programming ability to write javascipt and probably to create my own image rotator, I'm not going to do that. This is a "problem" that has been thoroughly solved by others and the solution is to use a solid javascript framework or a proven script from the hundreds (thousands??) out there on the net.

0
 
Michel PlungjanIT ExpertCommented:
Also it is not possible for Javascript alone to understand an IP address. You will need a server process to see if it is a new ip.

What you CAN do is set a cookie and show the same site if the cookie is set
0
 
BadotzCommented:
bportlock: I simply asked a question. It has yet to be answered.
0
 
Beverley PortlockCommented:
@badotz  - I realise that, but many new posters seem to think that EE is like freelancer.com and I thought I should clarify the difference.

I don't do homework either...

;-)
0
 
BadotzCommented:
bportlock: We don't yet know if it is homework. helyonprime96 has not answered my question.
0
 
helyonprime96Author Commented:
sorry guys for delay.
i understand the EE rules.

Howoner i need to do same this script.
I doesnt request all code.

This in not framework.
0
 
helyonprime96Author Commented:
thanks experts
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now