Advertisement

05.27.2007 at 02:15PM PDT, ID: 22597372
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

4.2

JavaScript dynamic table using a  table row template

Asked by jws2bay in Scripting Languages, JavaScript

Tags: , , , ,

I have a java script function which uses appendChild( createTableCell) to build a dynamic table as required. Every time an item is added the variable num in incremented and this function is called to add a row in a table to provide detailed information about the item added.

// num is number of the object the table row references

function addTableRow(num) {
            // add new table row to dynamic table
            var tr = document.createElement('TR');
            tr.id = 'dynamicRow' + num;
            tr.setAttribute( 'id', 'dynamicRow' + num );

            tr.appendChild( createTableCell( num ) );
            tr.appendChild( createTableCell( '<select name="type'+num+'"><option>Select Glass</option></select>' ) );
            tr.appendChild( createTableCell( '<select name="design'+num+'" class="style15"><option>Clear - No Design</option></select>' ) );                  tr.appendChild( createTableCell( '<input name="width'+num+'" >' ) );
            tr.appendChild( createTableCell( '<input name="height'+num+'" >' ) );
            tr.appendChild( createTableCell( '<input name="price'+num+'" >' ) );

            $('dynamicTable').appendChild( tr );
            
      }


 The problem is that I need  to dynamically populate the select lists used in the table. The select lists will be identical from row to row, but need to change when the page loads.

If I build a template in html / php and call it from the java script function I think it will do what I need.  The template will be dynamically populated on the page load, and the java script function can call it as required.



// Sample Template  - the # needs to be changed to the row number num when insert into the table

<tr id="dropdownTemplate">
            <td name="glassNum">Glass Number</td>
            <td><select name="type#"><option>Select Glass</option></select></td>
            <td><select name="design#"><option>Clear - No Design</option></select></td>
            <td><input name="width#"></td>
            <td><input name="height#"></td>
            <td><input name="price#" disabled></td>
      </tr>


I have verified that with a little php I can populate the select list as needed. I can insert the template, but I haven’t figured out how to change the names so that each row represents the num object. I probably shouldn’t insert it, but should clone it, rename it, and then insert the clone. Need a little direction here.

Thanks

Start Free Trial
[+][-]05.27.2007 at 02:34PM PDT, ID: 19165325

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.27.2007 at 04:20PM PDT, ID: 19165562

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.27.2007 at 07:26PM PDT, ID: 19165885

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2007 at 11:04AM PDT, ID: 19168341

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.28.2007 at 02:34PM PDT, ID: 19169139

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.28.2007 at 05:27PM PDT, ID: 19169583

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.28.2007 at 05:49PM PDT, ID: 19169617

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 09:24AM PDT, ID: 19173450

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 09:46AM PDT, ID: 19173641

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 11:57AM PDT, ID: 19174563

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 01:51PM PDT, ID: 19175425

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 02:09PM PDT, ID: 19175545

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 05:00PM PDT, ID: 19176472

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.29.2007 at 05:19PM PDT, ID: 19176529

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 08:05AM PDT, ID: 19180612

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 08:16AM PDT, ID: 19180708

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 08:17AM PDT, ID: 19180717

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 08:25AM PDT, ID: 19180815

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 08:37AM PDT, ID: 19180923

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 08:52AM PDT, ID: 19181065

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 09:13AM PDT, ID: 19181231

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 09:37AM PDT, ID: 19181430

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Scripting Languages, JavaScript
Tags: table, javascript, dynamic, row, using
Sign Up Now!
Solution Provided By: vevex
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.30.2007 at 10:18AM PDT, ID: 19181740

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 11:28AM PDT, ID: 19182334

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 12:18PM PDT, ID: 19182743

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 12:39PM PDT, ID: 19182908

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 01:33PM PDT, ID: 19183266

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 02:15PM PDT, ID: 19183546

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.30.2007 at 06:51PM PDT, ID: 19184994

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32