Solved

Image rotator js script

Posted on 2011-03-12
11
560 Views
Last Modified: 2012-05-11
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
Comment
Question by:helyonprime96
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 500 total points
ID: 35115785
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
 

Author Comment

by:helyonprime96
ID: 35115800
i need a js script.
can you write a one simple?
0
 
LVL 34

Assisted Solution

by:Beverley Portlock
Beverley Portlock earned 500 total points
ID: 35115848
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
 
LVL 29

Expert Comment

by:Badotz
ID: 35115985
Is this homework?
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 35116078
@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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 35116146
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
 
LVL 29

Expert Comment

by:Badotz
ID: 35116192
bportlock: I simply asked a question. It has yet to be answered.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 35116288
@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
 
LVL 29

Expert Comment

by:Badotz
ID: 35116373
bportlock: We don't yet know if it is homework. helyonprime96 has not answered my question.
0
 

Author Comment

by:helyonprime96
ID: 35116934
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
 

Author Closing Comment

by:helyonprime96
ID: 35361735
thanks experts
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now