Results 1 to 3 of 3
Thread: Dynamic element in a statement
- 12-08-2009, 10:09 PM #1
Member
- Join Date
- Dec 2009
- Posts
- 1
- Rep Power
- 0
Dynamic element in a statement
Hello,
I am developing a website with a questionnaire. Some questions will make other questions disabled, depending on a variable. In the radiobutton of the question I made an "onclick"-reference to the disableField function with an variable in it being the number of the question. I want this variable being part of the statement (also ???). Is it possible to create a sort of dynamic element in this statement, depending on a variable? Thanks in advance for helping me.
function disableField(???) {
myform.???[0].disabled=true;
myform.???[1].disabled=true;
myform.???[2].disabled=true;
myform.???[3].disabled=true;
}
- 12-08-2009, 10:51 PM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 294
- Rep Power
- 0
maybe, idk if this might help in anyway, but u could maybe do like this:
blah blah function(){
button1 = true;
button2 = button1 ? true : false;
I think that's the way to do it..
- 12-09-2009, 11:01 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 13,541
- Rep Power
- 27
Similar Threads
-
How to access element in a CSV?
By venkatteshb in forum New To JavaReplies: 11Last Post: 08-17-2008, 12:37 PM -
how can we get the element of by using the hashtable
By raj reddy in forum Web FrameworksReplies: 1Last Post: 05-06-2008, 02:45 PM -
Max element in an Array
By mew in forum New To JavaReplies: 5Last Post: 12-03-2007, 06:26 PM -
a no such element exception
By headlice1 in forum New To JavaReplies: 1Last Post: 08-07-2007, 06:36 PM -
Statement or Prepared Statement ?
By paty in forum JDBCReplies: 3Last Post: 08-01-2007, 05:45 PM
Bookmarks