473,396 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

dynamically created tables on the basis of user inputs in the textbox

7
How to create dynamically tables on the basis of user inputs in the textbox for example if user write 3 in the textbox three table should be display n so on
code of table is
this is my table code
Expand|Select|Wrap|Line Numbers
  1. <table border="1" align="center">
  2. <tr><th>A</th><th>W</th><th>NO</th><th>AV</th><th>AP</th><th>AP Phase</th><th> Consumption </th></tr>
  3. <tr><td>Tl</td>
  4. <td>
  5. <select  id="in4"  name="t1" onclick="getText3()" onchange="getText39()" onchange="getText89()" >
  6.  <option value="0"> 0 </option>
  7.   <option value="12"> 12 </option>
  8.   <option value="18"> 18 </option>
  9.   <option value="24"> 24 </option>
  10.   <option value="75"> 75 </option> 
  11.   </td>
  12.   </select>
  13. <td><input type="text" name="t2" id="in1" onclick="getText3()" onchange="getText39()" onmouseout="getText89()"> </td>
  14. <td>
  15. <select name="a1" id="in2" onclick="getText3()" onchange="getText39()">
  16.  <option value="0"> 0 </option>
  17.   <option value="1"> 1 </option>
  18.   <option value="2"> 2 </option>
  19.   <option value="3"> 3 </option>
  20.   <option value="4"> 4</option> 
  21.     <option value="5"> 5</option>   
  22.  
  23.   </td>
  24.   </select>
  25.   <td><input type="text" id="in3" name="username" Readonly/></td>
  26.   <td><input type="text" id="in39" Readonly/></td>
  27. <td><input type="text" id="in89" name="table" readonly="in89" /></td>
  28.  </tr>
  29. <tr><td>FA</td>
  30. <td><input type="text" name="t11" id="in44" value="100"/></td>
  31. <td><input type="text" name="t22" id="in11"  onclick="getText4()" onchange="getText37()"  onmouseout="getText98()"  /> </td>
  32. <td>
  33. <select name="a11" id="in22"  onclick="getText4()" onchange="getText37()" >
  34.  <option value="0"> 0 </option>
  35.   <option value="1"> 1 </option>
  36.   <option value="2"> 2 </option>
  37.   <option value="3"> 3 </option>
  38.   <option value="4"> 4</option> 
  39.     <option value="5"> 5</option>   
  40.  
  41.   </td>
  42.   </select>
  43.   <td><input type="text" id="in33" name="name" Readonly/></td>
  44.     <td><input type="text" id="in37" Readonly/></td>
  45.       <td><input type="text" id="in98" /></td>
  46.  </tr>
  47.  <tr><td>Bu</td>
  48. <td><select  id="in444"  name="tr" onclick="getText5()" onchange="getText399()" onchange="getText899()" >
  49.  <option value="0"> 0 </option>
  50.   <option value="40"> 40 </option>
  51.   <option value="60"> 60 </option>
  52.   <option value="80"> 80</option>
  53.   <option value="100"> 100</option> 
  54.   </td>
  55.   </select>
  56. <td><input type="text" name="trr" id="in111"  onclick="getText5()" onchange="getText399()" onmouseout="getText899()"/> </td>
  57. <td>
  58. <select name="arr" id="in222"  onclick="getText5()" onchange="getText399()"/>
  59. <option value="0"> 0 </option>
  60.   <option value="1"> 1 </option>
  61.   <option value="2"> 2 </option>
  62.   <option value="3"> 3 </option>
  63.   <option value="4"> 4</option> 
  64.     <option value="5"> 5</option>   
  65.  
  66.   </td>
  67.   </select>
  68.   <td><input type="text" id="in333" name="class" Readonly/></td>
  69.     <td><input type="text" id="in399" Readonly/></td>
  70.      <td><input type="text" id="in899" name="table1" readonly="in899" /></td>
  71.  </tr> </table>
  72. Tc<input type="text" name="t6" id="in123" onclick="getText6()"/></td>
  73.  Tcr<input type="text" name="abc" id="in134"  onclick="getText66()"/></tr>
  74.  </form>
May 24 '13 #1
3 1718
Rabbit
12,516 Expert Mod 8TB
Please use code tags when posting code.

When the user selected value is sent to the php page, use a loop to echo the table that you have there 3 times.
May 24 '13 #2
malika
7
how could i apply loop on the table ? can u help in this regard as i am new in ths php plz help me where i put the loop
May 25 '13 #3
Rabbit
12,516 Expert Mod 8TB
You put the loop around the table creation code.

Since you're new to PHP, it may help you to invest some time in a tutorial. This one is a good one to start with: http://www.w3schools.com/php/
May 25 '13 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: NewmanBT | last post by:
I need some help with the following code It should be changing the report whenever the row array is changed, but it isn't. I've done some editing to remove parts of the code that I don't think...
4
by: Stuart Perryman | last post by:
Hi, I have code that is creating tables dynamically. For some reason unbeknown to me, the attributes 'rowspan' and 'colspan' are being ignored in IE 6.02 on XP SP2 In Firefox the behaviour is...
5
by: Jack Johnston | last post by:
Hi there, I am dynamically created a table at runtime on an aspx form. The last cell of each row contains a TextBox in which the user will enter numeric values into. Each textbox I create is...
2
by: R Duke | last post by:
I have tried everything I can think of to change the visible property of a design time created control from a dynamically created control's command event handler. Here is the scenario. I have...
5
by: Jason | last post by:
Hi all I am building a page dynamically on Page_Load. using Table web controls for this. the web page builds up and loads up and displays ok. but as soon as there is a post back of any sort,...
1
by: drakuu | last post by:
All, I created dynamically part of a table and its components such as text boxes etc... As you can see in the example below I created txtAddress textbox... Everything works perfectly until the...
1
by: cosmodango | last post by:
I am working on a form with the basic textboxes, dropdowns, etc.; however, I have a need for the client side to have the option to create a table dynamically in the form. In essence, Joe User would...
5
by: davidson1 | last post by:
Hai Friends, I have the following code for Dynamically Created Tables, I have created the panel in the webform....... Dim tab5 As New Table Dim row1 As New TableRow Dim cell1 As...
3
by: ahmadbaseet | last post by:
Hello all I am new to VB.NET. I am trying to create dynamically objects and giving them the event handles. Something like this Dim NewTab As New TabPage Dim NewTextBox As New...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.