Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2011
    Posts
    35
    Rep Power
    0

    Default Reversing dojo slider to make it slide from right to left rather left to right as giv

    I am using Dojo slider in my project But i want to reverse the slider chosen value so that it slides from right to left ie the blueish part on slider must start from right side of the slider so that slider slides from right to left(not from left to right as in given example) how can i reverse this. My code a s shown
    Java Code:
        <head>
            <style type="text/css">
                body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
            </style>
            <script src="../cmic/dojo/dojo/dojo.js"
            djConfig="parseOnLoad: true">
            </script>
            <script type="text/javascript">
                dojo.require("dijit.form.Slider");
                dojo.require("dijit.form.TextBox"); // this we only include to make the textinput look prettier
                dojo.addOnLoad(function() {
    
                    var slider = new dijit.form.HorizontalSlider({
                        name: "slider",
                        value: 0,
                        minimum: 10,
                        maximum: 0,
                        intermediateChanges: true,
                        style: "width:700px;",
                        onChange: function(value) {
                         dojo.byId("sliderValue").value = value;
                        }
                    },
                    "slider");
                });
            </script>
            <link rel="stylesheet" type="text/css" href="../cmic/dojo/dijit/themes/claro/claro.css"
            />
        </head>
    
        <body class=" claro ">
    
            <div id="slider"  intermediateChanges="true" showButtons="false" style="width:400px;color:#606060;">
            <ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration"
                style="height:1.5em;color:#585858;font-size:75%;color:gray;">
            <li>10
                    </li>
                 <li>
                        8
                    </li>
                    <li>
                        6
                    </li>
                    <li>
                        4
                    </li>
                 <li>
                        2
                    </li>
                    <li>0
                    </li>
                </ol>
    
    
    
            <ol dojoType="dijit.form.HorizontalRuleLabels" container="topDecoration"
                style="height:1.5em;font-size:90%;color:#606060;margin:-1em 0px 0px 7.00em;">
    
                   <li>
                        Outstanding
                    </li>
                    <li>
                        Highly effective
                    </li>
                    <li>
                        &nbsp&nbspEffective
                    </li>
                    <li>
                           &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbspNeeds Improvement
                    </li>
                    <li>
                          &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbspNot Acceptable
                    </li>
                   <li>
    
                    </li></ol>
    
    
        </div>
            <p>
                <input type="text" id="sliderValue" dojoType="dijit.form.TextBox" />
            </p>
            <script type="text/javascript">
                dojo.addOnLoad(function() {
                    if (document.pub) {
                        document.pub();
                    }
                });
            </script>
        </body>
    
    </html>
    Last edited by gurpreet.singh; 05-04-2011 at 12:14 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

Similar Threads

  1. square moves left and down but not up or left
    By natdizzle in forum AWT / Swing
    Replies: 3
    Last Post: 02-04-2011, 06:20 PM
  2. mp5 left!!.. anyOne know it?.
    By jhon123 in forum New To Java
    Replies: 0
    Last Post: 01-31-2011, 06:50 AM
  3. jasperreport-right to left
    By marjanzfz in forum Advanced Java
    Replies: 1
    Last Post: 09-15-2009, 04:06 PM
  4. menu in top left always
    By sschwinghammer in forum New To Java
    Replies: 2
    Last Post: 02-06-2008, 03:39 PM
  5. Replies: 3
    Last Post: 07-19-2007, 12:12 PM

Tags for this Thread

Posting Permissions

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