User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 425,768 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,322 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 490 | Replies: 1 | Solved
Reply
Join Date: May 2008
Posts: 11
Reputation: jennifer_48219 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
jennifer_48219 jennifer_48219 is offline Offline
Newbie Poster

Array

  #1  
May 27th, 2008
Hi I am working on array and made some good improvement into my code. Now I am just having one problem.
I want the number to display in my text box area starting from 0 to 1000
I know how to do it for alert but not to display in a downward order like

0
1
2
3
4
5
6
7
8
9
10
etc

in my text box area, can someone look at my code and let me know what to do to replace my alert. So that it can display the list of numbers instead of only one number. Please be easy on me I am a beginner and have an old brain.

var Numbers = new Array();
var LastNumber = new Array();


function WhileTest()
{FillArray()
{i = 0;
{while (i < LastNumber) {
  alert([i]);
document.frmMain.txtaOutput.value = (i) + "\n"
  i = i + 1;
}
}
}
}

function FillArray()
{
	Numbers = 0;
   	if (document.frmMain.txtLastNumber.value >= "0")
   	{ 
   	LastNumber = document.frmMain.txtLastNumber.value; 
   	}
   	alert (LastNumber);
   	} 
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 11
Reputation: jennifer_48219 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
jennifer_48219 jennifer_48219 is offline Offline
Newbie Poster

Re: Array

  #2  
May 28th, 2008
I figured it out. I did the game of elemination and played around with some string until ching ching it worked
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 2:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC