473,385 Members | 1,359 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.

Do I need to copy the functions?

How do I match the functions from the top of my jsfidde, Options, Number of Answers and Answers with the same features for each and every table row which is added when user clicks on the "Add question" button.

The function that adds the new rows is near the bottom of the javascript section which is known as "insertQuestion(form)" and the other functions above controls the Option Types, Number of Answers and Answers features.

Can I copy and paste the functions but match them with the right ids and class which is in the insertQuestion(form) to control each feature within the rows. If so where do I copy the functions?

Follow these steps to help use the fiddle:

Step 1: Open the fiddle and you see an options and answers section on top. Open the grid and select option 8. Buttons A to H would appear.

Step 2: Type in 2 in the Number of Answers Textbox.

Step 3: Select buttons A and D, you will find out that those buttons would turn green to show they are selected. Now as you entered in 2 in the Number of answers textbox (step 2), it won't let you select more than 2 buttons, if you do an alert would apear stating you are beyond limit please deselect a button to choose another button.

Step 4. Click "Add Question", a new row is added in the table.

Step 5: In the new row you just created, lets say that oh no I made a mistake, there should be 4 answers not 2 answers and within the table row you just added you changed the number of answers textbox from 2 to 4. Select you buttons, hek select 5,6,7 buttons nothing is stopping you. This is the problem. You try and do that on the options and answers feature on top of the fiddle it does not let you do that but it lets you do it in the table row. This is the problem.

Whole code is in jsfiddle, click [here][1] Please test your answers in the fiddle if you wish before posting your answer. More chances of getting the correct answer


[1]: http://jsfiddle.net/rSdwa/15/

Thanks
Dec 26 '11 #1
0 1081

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

Similar topics

4
by: Bob Smith | last post by:
Is shutil.copyfile(src,dst) the *most* portable way to copy files with Python? I'm dealing with plain text files on Windows, Linux and Mac OSX. Thanks!
0
by: atl-jcd | last post by:
Does anyone have a HTML or PDF copy of the old Al Stevens article: "Passing the C++ Test: Securing success in an interview" from Dr. Dobbs Journal (I know I can get it from the DDJ site if I...
0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
4
by: away | last post by:
1. When a class defined with a member of pointer type, it's necessary to have a copy constructor and assignment operator. If don't pass objects of such class as value in a function and don't do...
1
by: Rui Rosa Mendes | last post by:
I need a Round function, in Expression Syntax. - Is there any not documented? - Can I associate one? Thanks. Rui rrm@medialog.pt
24
by: rdc02271 | last post by:
Hello! Is this too crazy or not? Copy constructor: why can't I copy objects as if they were structs? I have a set of simple objects (no string properties, just integers, doubles) and I have to...
2
by: Henrik Goldman | last post by:
Hi, Lets say you have class A which holds all data types as private members. Class B then inherits from A and does *only* include a set of public functions which uses A's existing functions for...
1
by: prabhun2004 | last post by:
hi all i use postgresql database. There are two databases in that namely 'db1','db2'. In 'db1', thers is a table named as 'table_common'. In 'db2', there is a table named as...
6
by: Peng Yu | last post by:
Hi, I'm wondering if the following assignment is lazy copy or not? Thanks, Peng std::vector<intv. v.push_back(1); v.push_back(2);
3
by: yoma | last post by:
python version 2.5 in module copy we all know that copy have two method: copy() and deepcopy(). and the explain is - A shallow copy constructs a new compound object and then (to the extent...
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
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.