scriptaculous slider problem

Discussion in 'JavaScript' started by Sleeping Troll, Jun 4, 2009.

  1. #1
    I am trying to create a slider,
    Here is my CSS:
    .track {
       background-color: #aaa;
       position: relative;
       height: 0.5em; width: 10em;
       cursor: pointer; z-index: 0;
    }
    .handle {
       background-color: red;
       position: absolute;
       height: 1em; width: 0.25em; top: -0.25em;
       cursor: move; 
       z-index: 2;
    }
    Code (markup):
    My HTML:
    		<div id="track_Size" class="track">
    			<div id="handle_Size" class="handle"></div>
    		</div>
    HTML:
    My script:
    Control[0]=new Control.Slider('handle_Size','track_Size');
    Code (markup):
    I keep getting "this.track is null", error is thrown by scriptaculous.
    Can anybody help me out here?

     
    Sleeping Troll, Jun 4, 2009 IP