Results 1 to 6 of 6

Thread: Script help

  1. #1

    Script help

    Hi all,

    I am a newbie to coding and this forum, so please move my thread to the related category if its not now.

    I am trying to use the Erik Arvisson's slider js but as I am new so I can not make changes in it.

    In its original condition, timer does not start and visitor has to click on a part manually to view its content. I want to start timer, so it automatically change the content after a specific period of time {say 10 seconds). I have tried hard but could not make this happen.

    Timer.js original code is in attachment:

    Kindly look and suggest me what changes I have to do so timer starts.

    Its documentation and all information with files can be found here:
    webfx.eae.net/dhtml/slider/api.html


    Thanks in advance
    Attached Thumbnails Attached Thumbnails timer.JPG  

  2. #2
    Join Date
    Jun 2006
    Location
    Lawerence, MA
    Posts
    301
    Is there a link to the problem page so we can help diag it?

  3. #3
    Well, I do not have any space yet. Testing it on local computer. As it is in html page, so it can run directly. You can find all the files here, so just download them and see, thank you.

    link: webfx.eae.net/dhtml/slider/api.html

  4. #4
    Join Date
    Apr 2008
    Posts
    334
    Welcome to the forums.

    There is certainly an easier and better way to achieve what you want than messing with this slider's framework.
    Additionally, you should consider using a more renowned one, such as script.aculo.us' slider : http://madrobby.github.com/scriptaculous/slider/

    You will need to provide more details and pieces of your own HTML page/Javascript so we may better understand your situation.

  5. #5
    thanks a lot WootWoot.

    reason to use this slider is that it is supported by the previous browser versions as well coz most people in my country still use old versions , so that's why i am using it.

    well, i have uploaded it on a live server so you can check it closely and here is the link:

    zkglobalenterprises.com/slidertest.html

    Basically, it is to show latest laptop deals with configurations and prices on main page. Currently, you have to grab the pointer or click on deal to view its specs and price. I want them to show automatically with time just like in other sliders.

    thanks in advance.

  6. #6
    Join Date
    Apr 2008
    Posts
    334
    Hi Leo,

    That's a nice implementation of a slider.

    For your information, script.acu.los' frameworks shall work fine in Internet Explorer 6/7.

    I can't seem to find out what's timer.js' exact purpose, but you would comonly use a simple setTimeout() calling class' method to change slider's value, to achieve what you want.

    PHP Code:
    var slider_value = -1;

    function 
    slider_rotation()
    {
        
    slider_value++;
        
        if (
    slider_value 4)
        {
            
    // Reached slider's last value
            
    slider_value 0;
        }
        
        
    s.setValue(slider_value);
        
    setTimeout('slider_rotation()'10000);
    }

    setTimeout('slider_rotation()'10000); 
    Check out a working example here.

    Next up, you may want to change p0 to p4 DIV's onclick attribute so if someone clicks on the slider to manually choose an option it (temporarily or not) clears the timeout that automatically change slider's value.

    Wish you a good continuation.

Similar Threads

  1. Replies: 14
    Last Post: 06-08-2006, 08:41 PM
  2. iHost 1.01 - Auto Account Creation and Billing Script | iSupport 1.05 Helpdesk Script
    By listenmirndt in forum Other Web Hosting Related Offers
    Replies: 7
    Last Post: 04-16-2005, 04:00 AM
  3. iHost 1.01 - Auto Account Creation and Billing Script | iSupport 1.05 Helpdesk Script
    By listenmirndt in forum Other Web Hosting Related Offers
    Replies: 4
    Last Post: 03-02-2005, 06:33 AM
  4. iHost 1.01 - Auto Account Creation and Billing Script | iSupport 1.05 Helpdesk Script
    By listenmirndt in forum Other Web Hosting Related Offers
    Replies: 5
    Last Post: 02-14-2005, 07:24 PM
  5. iHost 1.01 - Auto Account Creation and Billing Script | iSupport 1.05 Helpdesk Script
    By listenmirndt in forum Other Web Hosting Related Offers
    Replies: 4
    Last Post: 01-29-2005, 06:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •