Solved

Image rotator js script

Posted on 2011-03-12
11
557 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Is this homework?
0
 
LVL 34

Expert Comment

by:Beverley Portlock
Comment Utility
@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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
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
Comment Utility
bportlock: I simply asked a question. It has yet to be answered.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
Comment Utility
@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
Comment Utility
bportlock: We don't yet know if it is homework. helyonprime96 has not answered my question.
0
 

Author Comment

by:helyonprime96
Comment Utility
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
Comment Utility
thanks experts
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

772 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

12 Experts available now in Live!

Get 1:1 Help Now