Solved

Image rotator js script

Posted on 2011-03-12
11
577 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

628 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