Click to See Complete Forum and Search --> : Looking for a script
wittyname
09-27-2003, 10:37 PM
I was wondering if there was a script that will display all the numbers from one to one million like this:
1
2
3
4
etc.
I really need this, although it may sound dumb. Thnx in advance, Im sorry for just running in, and asking a question right away, but I'm in REALLY REALLY dire need
Khalid Ali
09-28-2003, 01:05 AM
I think this might help
<script type="text/javascript">
var limit = 100;//set the limit to whatever number
for(var n=0;n<limit;n++){
document.writeln((n+1)+"<br/>");
}
</script>
wittyname
09-28-2003, 06:53 AM
wow, thnx, haha, I got up to 400,000 with that b4 crashing, is there any way to make that go directly to your clipboard? or directly generate a downloadable text file? :P Im having a bit of trouble not crashing :)
Making it go to the clipboard would be an overkill for your computer, unless you have around 2GB of RAM or more and no other processes going on when you do it... If you have a server-side language supported on your server, you can apply the same basic concept and make it write to a file that it will let you download or direct you to download immediately... I can show you how to do this in PHP, but I've never tried to do it in CGI, ASP or JSP (although I could probably figure it out easily in those languages, I don't have ASP or JSP support).
[J]ona