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

  • Home
  • SEARCH
  • 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 8896323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:00:52+00:00 2026-06-15T00:00:52+00:00

I am new to javascript. I just want to take input in the created

  • 0

I am new to javascript. I just want to take input in the created textfield.

So that I created a ul tag with id cstList.

and called a function listData() on the onclick event

Inside that I am trying to create a input tag inside a div tag.

After creation I am not able to type in the textfield.

Can anybody tell me, why is it so?

Here is my listData() code

function listData()
    {       
        //var a = sessionStorage.getItem('id');
        if(sessionStorage == null)
        {
            alert("Session storage not supported here");
        }
        else
        {
            var ss = sessionStorage.getItem('id');
            alert("storage value is: "+ss);
        }
    var rows = prompt('Please type in the number of required rows');
    var listCode = '';

    for (var i = 0; i < rows; i++) {
        var listID = 'list_' + i.toString();
        var divID = 'div_' + i.toString();
        var inputIdp = 'inputp_'+ i.toString();
        var inputIdq = 'inputq_'+ i.toString();
          //  listCode += '<li id="' + listID + '><div id = "'+ divID + '"> <input type= "text" id= "boltQTY" name= "boltQTY" value = "abc"/> <input type= "text" id= "a" name= "boltQTY" value = "abc" size="5"/></div></li>';

          listCode += "<li id='" + listID + "'><div id = '"+ divID + "'> <input type='text' id='" + inputIdp + "' name='" + inputIdp + "' value='' size='15'/> <input type='text' id='" + inputIdq + "' name='" + inputIdq + "' value='' size='15'/> </div></li>";

            //variable = "string" + var1 + "string=' " + var2 +"' ";
    }
    document.getElementById('cstList').innerHTML = listCode;
    }
  • 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-06-15T00:00:54+00:00Added an answer on June 15, 2026 at 12:00 am

    I got an answer. That was the issue with the iscroll, discussed on the group.google.com.

    Resolved the problem of entering the value in text field by the below code.

    Create this code in new js file.

    iScroll.prototype.handleEvent = function(e) {
        var that = this,
            hasTouch = 'ontouchstart' in window && !isTouchPad,
            vendor = (/webkit/i).test(navigator.appVersion) ? 'webkit' :
                     (/firefox/i).test(navigator.userAgent) ? 'Moz' :
                     'opera' in window ? 'O' : '',
            RESIZE_EV = 'onorientationchange' in window ? 'orientationchange' : 'resize',
            START_EV = hasTouch ? 'touchstart' : 'mousedown',
            MOVE_EV = hasTouch ? 'touchmove' : 'mousemove',
            END_EV = hasTouch ? 'touchend' : 'mouseup',
            CANCEL_EV = hasTouch ? 'touchcancel' : 'mouseup',
            WHEEL_EV = vendor == 'Moz' ? 'DOMMouseScroll' : 'mousewheel';
    
        switch(e.type) {
            case START_EV:
                if (that.checkInputs(e.target.tagName)) {
                    return;
                }
    
                if (!hasTouch && e.button !== 0) return;
    
                that._start(e);
                break;
            case MOVE_EV: 
                that._move(e); 
                break;
            case END_EV:
                if (that.checkInputs(e.target.tagName)) {
                    return;
                }
            case CANCEL_EV: 
                that._end(e);
                break;
            case RESIZE_EV: 
                that._resize();
                break;
            case WHEEL_EV: 
                that._wheel(e); 
                break;
            case 'mouseout': 
                that._mouseout(e); 
                break;
            case 'webkitTransitionEnd': 
                that._transitionEnd(e); 
                break;
        }
    }
    
    iScroll.prototype.checkInputs = function(tagName) {
        if (tagName === 'INPUT' || tagName === 'TEXTFIELD' || tagName === 'SELECT') {
            return true;
        } else {
            return false;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm very new to javascript, I just want a reqular expression for validating phone
Very new to javascript and html-type stuff. I wanted to just make a quick
I have just started learning Jquery and am new to writing javascript (I am
I've just got the new Visual Studio 2010 Ultimate and Javascript Intellisense is not
I'm using Nodejs and Socket.io. When the client connects, new JavaScript objects are created.
I am very new in JavaScript world. function ButtonClickAction2 (zEvent) { self.location=xxx.asp?action=go&Locale=2; } I
Hi I'm quite new to javascript and I want to get extract a text
Possible Duplicate: Converting user input string to regular expression javascript new regexp from string
I'm relatively new javascript, but I am comfortable in other languages. I'm trying to
New to javascript and such, trying to create a loop for fading logos using

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.