Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Location
    Preston, Lancashire, England
    Posts
    285
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't enter data into all new boxes

    Hello.

    I have a script that will add up to 10 rows into a table. each row of the table contain. 2 text boxes and 4 drop down boxes.

    But sometimes with i try to enter data into the last few text boxes i can't click into the box and enter data. i can only tab into the box and enter the data.

    I was just wondering if there might be two many dynamic input boxes on the page or if

    Code:
    function AddRows(type)
    	{	
    		if(RowCounter < 10)
    		{		    
    		    RowCounter++;
    			var table = document.getElementById('tblResult');
    			var myRow=table.insertRow(RowCounter);
    			myRow.height="21px";
    			myRow.style.verticalAlign = "Top";
    			var cell1 = myRow.insertCell(0);
    			cell1.id = "oddsboxes"+RowCounter;
    			cell1.name = "oddsboxes"+RowCounter;
    			cell1.width = "150px";
    			cell1.height = "21px";
    			cell1.align = "center";
    			cell1.style.verticalAlign = "Top";			
    			cell1.style.whiteSpace = "nowrap"			
    			if(document.getElementById("hiddenoddsformat").value == "decimal")
    			{			    
    			    cell1.innerHTML = GetInputBoxDecimal(RowCounter);
    			}
    			else
    			{
    			    cell1.innerHTML = GetInputBoxFraction(RowCounter);
    			}			
    		
    			var cell2 = myRow.insertCell(1);
    			cell2.align = "center";
    			var box1 = document.createElement("select");
    			box1.name = "result"+RowCounter;
    			box1.id = "result"+RowCounter;
    			box1.options[0] = new Option("Won", "won");
    			cell2.appendChild(box1);
    
    			var cell4 = myRow.insertCell(2);
    			cell4.align = "center";
    			var box7 = document.createElement("select");
    			box7.name = "Terms"+RowCounter;
    			box7.id = "Terms"+RowCounter;
                box7.options[0] = new Option("1/2", "2");
    
    			box7.selectedIndex = 2;
                if(document.getElementById("PlaceTermsEW").checked == false)
                {
                    box7.disabled = true;
                }
    			cell4.appendChild(box7);	
    		
    			var cell5 = myRow.insertCell(3);
    			cell5.align = "center";
    			var box8 = document.createElement("select");
    			box8.name = "Rule4"+RowCounter;
    			box8.id = "Rule4"+RowCounter;
    			box8.options[0] = new Option("0", "00");			
    			cell5.appendChild(box8);		
    	
    			var cell6 = myRow.insertCell(4);
    			cell6.align = "center";
    			var box9 = document.createElement("select");
    			box9.name = "Deadheat"+RowCounter;
    			box9.id = "Deadheat"+RowCounter;
    			box9.options[0] = new Option("N/A", "N/A");			
    			cell6.appendChild(box9);
    			
    			if(type == "button")
    			{
    			   RemoveRow("blank");
    		    }
    		}
    	}
    the above code is just part of the insert function (i have taken all be one option of the select box.

    Can anyone else. Cheers

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    was just wondering if there might be two many dynamic input boxes on the page
    I doubt it. But I guess it's possible. Try another browser maybe? Also if you could post a link to an example of this happening that would help us see what it's doing.

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Location
    Preston, Lancashire, England
    Posts
    285
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Fumigator View Post
    I doubt it. But I guess it's possible. Try another browser maybe? Also if you could post a link to an example of this happening that would help us see what it's doing.
    sorry ill get something together
    Last edited by MRMAN; 08-15-2007 at 10:30 AM. Reason: told off by boss


  •  

    Posting Permissions

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