Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6202719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:47:18+00:00 2026-05-24T04:47:18+00:00

I am not good in javascript. But recently I was given the task of

  • 0

I am not good in javascript. But recently I was given the task of creating a slider. I thought I can create one using dojo. When i went to the the jsp page I saw that there is already dojo used in the same jsp file and it looks somewhat like this.

 <script language="JavaScript" type="text/javascript" src="js/dojo/dojo-release-1.3.1/dojo/dojo.js" djConfig="parseOnLoad: true, locale: '<%=request.getLocale().getLanguage()%>'"></script>

and

    window.onload = function() {
        dojo.require("dojo.number");
    };

I don’t know what this means.

My question is that how can i create a slider with this version of dojo which is already used in the file. Any reference links if highly appreciated.

In addition the web prject has following structure for dojo library(See SnapShot)enter image description here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:47:19+00:00Added an answer on May 24, 2026 at 4:47 am

    Since I already had a jsfiddle with this, I’m going to assume the answer to my comment is yes 🙂 Try the following. Inside your window.onload function add a few more lines:

    window.onload = function() {
        dojo.require("dojo.number");
    
        dojo.require("dijit.form.HorizontalSlider");
        dojo.require("dijit.form.HorizontalRule");
        dojo.require("dijit.form.HorizontalRuleLabels");
    
    
        dojo.addOnLoad(function() {
            dojo.parser.parse()
        });
    }
    

    The dojo.require calls tell Dojo to load some more javascript from your server. Since we want to make a slider, Dojo needs the slider’s javascript files.

    The dojo.addOnLoad call tells Dojo to add a function to its onLoad event. We are already inside window.onload, but since we are loading more javascript from the server, we have to use Dojo’s own onLoad event to wait for the new scripts to load.

    The function we want to call in Dojo’s onLoad event is dojo.parser.parse. This function scans your HTML, and if it detects any Dojo markup, it turns it into nice widgets (like a slider, for example). This means we need some Dojo markup in the HTML, so add the following to your HTML where you want the slider to appear.

    <div dojoType="dijit.form.HorizontalSlider" maximum="100" minimum="0"
        style="width:250px" id="slider1" name="slider1">
            <div dojoType="dijit.form.HorizontalRule" style="height: 4px" count="10"></div>
            <div dojoType="dijit.form.HorizontalRuleLabels" count="5"></div>
    </div> 
    

    Dojo’s parser will replace this with a beautiful slider, there’s just one more thing we have to do – make sure we have the right CSS loaded. The file we want is called “tundra.css” (actually, there are other styles you can use, but tundra is quite nice). Add an import in your CSS, or for exaple

    <link rel="stylesheet" href="js/dojo/dojo-release-1.3.1/dijit/themes/tundra/tundra.css">
    

    To make sure the tundra style is applied to your slider, also add class="tundra" to your body tag.

    Hope this helps. Take a look at this link for more clues and ideas: http://archive.dojotoolkit.org/dojo-2010-05-01/dojotoolkit/dijit/tests/form/test_Slider.html (this isn’t really 1.3.1, but it should be similar).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lot of SO Answers are saying that SOAP webservice is not good using javascript.but
Can you suggest some good Javascript assignments/homework to C programmers , who are not
I am not good at jsp but I wondered what can cause such a
I recently started programming JavaScript and thought everything would be good... Well today I
I am working on modal login/registration forms. I'm not good with Javascript, but have
I'm not good with JavaScript, and this is Google's code. I'm getting a object
What is a good javascript (book or site) that is not just focused on
Are there any good JavaScript frameworks out there which primary audience is not web
I'm interested in speed, not good looking code, that is why I'm using array
I've been learning Js recently from JavaScript the Good Parts , and according to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.