?
Solved

Image rotator js script

Posted on 2011-03-12
11
Medium Priority
?
612 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 1500 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 1500 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
 
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
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…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

569 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