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 6126303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:21:22+00:00 2026-05-23T16:21:22+00:00

I created a characters generator. From: &#38;&#35;<input type=text value=33 class=from />; To: &#38;&#35;<input type=text

  • 0

I created a characters generator.

From: &#38;&#35;<input type="text" value="33" class="from" />;
To: &#38;&#35;<input type="text" value="1030" class="to" />;

It has two input fields to enter two numbers with max difference of 1000.

var from = $('input.from').val();
var to = $('input.to').val();
var diff = (to - from);

if ( diff > 1000 ){        
    $('.error').html('ERROR: This code could run slow. Numbers range MAX 1000 !');
}

It works fine but when in the right (to) field are numbers in the range 100 – 1000 if won’t work.

Could be the later peace of code is messing the things?
(I populate with it the container with characters in the range of the selected numbers, olways if theirs difference is not bigger than 1000 (’cause than the script may become unstable if more than 1000 generated divs.))

    var ascii = '';
    for (var i = from; i <= to; i++) {
        ascii += "<div class='box'> &#38;&#035;"+i+"&#59;  <span>&#"+i+";</span> </div>"
    }
  • 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-23T16:21:23+00:00Added an answer on May 23, 2026 at 4:21 pm

    Typecast your inputs as numbers or else the for loop won’t work correctly 🙂

    var from = Number($('input.from').val());
    var to = Number($('input.to').val());
    

    http://jsfiddle.net/8hV8E/4/

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

Sidebar

Related Questions

in Python, I have created a text generator that acts on certain parameters but
I've created a new major mode derived from cc-mode, because I'm using a meta-language
I created an app with the cake bake command, and one table used text
I have an Image class that has a byte[] to contain the actual image
I want to read from the text file which is placed in res/raw/text i
I have created a custom validator deriving from ValidationAttribute. My undertsandng is that it
For an online game (MMORPG) I want to create characters (players) with random strength
I'm creating an online game in PHP where users can create playable characters. Each
Can you create websites with Chinese characters in PHP? UPDATE: Perhaps I should have
I want to create a string in JavaScript that contains all ascii characters. How

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.