List Info

Thread: Populate an Array from User Input




Populate an Array from User Input
user name
2006-09-11 02:47:09
Is it possible to populate an array with a prompt having a
user enter
numbers or names, then use a document.write to display them?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
-~----------~----~----~----~------~----~------~--~---

Populate an Array from User Input
user name
2006-09-18 22:15:55
Should not be a problem something like this should work I
think

<script type="text/javascript">
var array_a;
array_a[0] = "start";//make it an array
function insert_a()
{
   array_a[array_a.lenght] =
document.getElementById("thetext").value;
}
</script>

<input type=text id=thetext><input type=button
action="insert_a();">

Nynrfan wrote:

> Is it possible to populate an array with a prompt
having a user enter
> numbers or names, then use a document.write to display
them?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "JavaScript Forum" group.
To post to this group, send email to
JavaScript-Informationgooglegroups.com
To unsubscribe from this group, send email to
JavaScript-Information-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/JavaScript-Information
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )