473,385 Members | 1,409 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,385 software developers and data experts.

Display table repeatedly on Combo box selection

I want to display repeat a <table> based on the count given in combo box

Please help me
Feb 19 '07 #1
3 2272
acoder
16,027 Expert Mod 8TB
Changed thread title.
Feb 19 '07 #2
acoder
16,027 Expert Mod 8TB
I want to display repeat a <table> based on the count given in combo box

Please help me
To display a table, you can do that in two ways, either use the standard DOM methods or just use innerHTML. For the DOM method, see here.

For combo boxes, do you want it on selection, or activated by a button click?
Feb 19 '07 #3
dorinbogdan
839 Expert 512MB
Just a small sample :

[HTML]
<html>
<head>
<title>Copy table</title>
</head>
<script language="JavaScript">
function CopyTable(){
var tbl = document.getElementById("tbl");
var sel = document.getElementById("sel");
var max = sel.options[sel.selectedIndex].value;
for (var i=1;i<=max;i++){
var tbl2 = tbl.cloneNode(true);
tbl2.id = "tbl"+i;
document.body.appendChild(tbl2);
}

}
</script>
<body>
<select id="sel">
<option value="1">one copy</option>
<option value="2">two copies</option>
<option value="3">three copies</option>

</select>
<input type="button" onclick="CopyTable()" value="Copy table">
<table border="1" id="tbl"><tr><td>Table1</td></tr></table>
</body>
</html>
[/HTML]
Feb 19 '07 #4

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

Similar topics

3
by: B Love | last post by:
I would like to display a drop-down list on a form conditional on the value of another field on the same form. I am not sure if this is good form or not. I am using Access97, but have access to...
3
by: Paul | last post by:
I have some option boxes and combo boxes that looks up values on a separate table (i.e. campus table with campusID & campus name fields) When I choose a selection from the combo box, it puts the...
2
by: Shannan Casteel via AccessMonster.com | last post by:
I have a table with information about different people...(i.e. Name, Address, Phone, Fax, etc.). The table has been linked to Access. I have created a combo box that uses this information. ...
3
by: google | last post by:
This is something I've done plenty of times in '97, but I can't seem to get it to work correctly in Access 2003. Say, for example, I have a form with an unbound combobox, the data source is a...
2
by: ApexData | last post by:
I am working on a lookup form, where the user will enter LastName FirstName and check for duplicates. I have a list box that is bound to a table of 200 members. After the user enters the name, I...
6
by: GaryGreenberg | last post by:
I am developing a web page for order processing using Spring MVC. In my JSP I have a table populated from the list of orders that are passed in the model (form backing object). Some fields there are...
6
by: carlos123 | last post by:
I have a programming assignement that i have been working on for quite some time now. I need your guys' help. My assignement is to great a table with data in it. and it will have a combobox and 2...
1
by: gdixon | last post by:
Greetings To All! I am using a Access 2003 and my programing skills are of the cut and paste variety. This means begining programming skills and on a good day perhaps middle of the road...
3
by: redearth777 | last post by:
I am try to limit the fields that are displayed in a subform based on the selection of the combo box. The table has a StudentName, test1, test2, and test3 among other fields. I am trying to create...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.