473,763 Members | 5,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PLEASE HELP W/ Adding item to a 2 dim array

Hi all,

Please help me with the following..it's realy urgent and i tried
everything i could and i can't get it work properly!! Thanks in
advance.

Here's what i'm trying to accomplish:
in my form i have a table with 3 rows (3 input text), in which user
can enter values and then clik save. When he clicks the Save button,
i'd like to be able to add the created items to the end of my table
(by adding rows dynamically to a table) so that can create his own
table dynamicaly with values he wants.
the first row is my table index. goes from 0 to whatever the user
wants....
i know how to add an item to 1 dim array. i know how to insert row to
a table using insertRow() but what i don't know is to put the whole
thing together....

<TABLE ID = "mytable">
<td><INPUT TYPE="Text"NAME ="TxtIndex" value=""></td>
<td ><INPUT TYPE="Text"NAME ="TxtName1"> </td>
<td ><INPUT TYPE="Text"NAME ="TxtName2"> </td>
<input type="button" value ="Save" onclick="addIte mToArray();">

i want my addItemToArray( ) method to create new rows (with the right
index and with values given by the user!!) any idea???

please please please please please please

Tx a million!
Jul 20 '05 #1
1 2004
Never mind guys! figured out how to do this!
tx!
ho*****@yahoo.c om (HolaGoogle) wrote in message news:<cd******* *************** ***@posting.goo gle.com>...
Hi all,

Please help me with the following..it's realy urgent and i tried
everything i could and i can't get it work properly!! Thanks in
advance.

Here's what i'm trying to accomplish:
in my form i have a table with 3 rows (3 input text), in which user
can enter values and then clik save. When he clicks the Save button,
i'd like to be able to add the created items to the end of my table
(by adding rows dynamically to a table) so that can create his own
table dynamicaly with values he wants.
the first row is my table index. goes from 0 to whatever the user
wants....
i know how to add an item to 1 dim array. i know how to insert row to
a table using insertRow() but what i don't know is to put the whole
thing together....

<TABLE ID = "mytable">
<td><INPUT TYPE="Text"NAME ="TxtIndex" value=""></td>
<td ><INPUT TYPE="Text"NAME ="TxtName1"> </td>
<td ><INPUT TYPE="Text"NAME ="TxtName2"> </td>
<input type="button" value ="Save" onclick="addIte mToArray();">

i want my addItemToArray( ) method to create new rows (with the right
index and with values given by the user!!) any idea???

please please please please please please

Tx a million!

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3608
by: David | last post by:
I have an array that contains numbers in string elements , i want to convert this to integers, i have made a for loop that uses the number of elements in the array and then adds 0, thereby converting it to an integer. //$chars is the array of strings for ($i=0; $i<$numpoints; $i++) { $array = array($chars + 0); } I dont know though how to add all these elements to the 1 array, it
5
2747
by: R.G. Vervoort | last post by:
Not sure if it is a php question but since i am working in php here it is. Ho can i add items to (the item label=visual text and the value=index number) a list object on a website. I am having a list with 4 items and i would like to add the text from a textfield (textfield1.value) to the list object so it will hold 5 items. thanks for any suggestions
31
2995
by: Raymond Hettinger | last post by:
Based on your extensive feedback, PEP 322 has been completely revised. The response was strongly positive, but almost everyone preferred having a function instead of multiple object methods. The updated proposal is at: www.python.org/peps/pep-0322.html In a nutshell, it proposes a builtin function that greatly simplifies reverse iteration. The core concept is that clarity comes from specifying a sequence in a forward direction and...
0
464
by: Stephen | last post by:
I have been getting on well with help from this forum trying to create an array list and work with it. Everything is working fine apart from displaying my array list items into the labels in my asp table. The asp table has numerous rows and each row has a label item within it. Im finding it impossible to get something to work which adds the newest item in the array list to the next row in the asp table. the first time the button is...
14
18749
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe is that as more and more are added, population of the list box takes longer and longer. ie the first 10th of the item set are added much much quicker than the last 10th. THis occurs with about 40,000 listbox items. My worry is the listbox may...
5
4602
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want to add a dictionary of name-value pairs. In other words, instead of a single name-value, I want to add a name-value collection in there. I could do this:
10
1955
by: Phat G5 (G3) | last post by:
I was toying around with adding a new method to the Array class. It works fine in FF but not in Safari. I have no idea in IE. I have not gotten that far yet. Array.prototype.find = function(item) { for(var i in this ) if( item == this(i) ) return( true ) return( false ); };
9
1967
by: Kiamari | last post by:
here's what i have to do: Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory. • Create a method...
3
3927
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is messing up. Problems:
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.