2013-02-09, 06:16 PM
You are denied support. I have no experience with the table plugin so would not be able to help you anyway. Sorry.
Table Question
|
2013-02-09, 06:16 PM
You are denied support. I have no experience with the table plugin so would not be able to help you anyway. Sorry.
2013-02-23, 09:10 AM
(2012-04-10, 05:19 PM)Vicky A Wrote: Hey all, I’m not sure if this has been answered before, but I did a search and I can’t find it. If it's already been answered somewhere, feel free to direct me to it! I’m currently trying to create a two row, two column table and transform it into a MyCode. I want to have one row to be able to be editable by members, whereas the other will have predefined text. I’m wondering if something like this is possible for MyBB, and if so, what would be the regular expression? The code I tried was something like this:Here is my function for making a column editable: function isEditable(rowArray, headersArray) { var counter = 0; var notEditable = ['product code', 'product']; for(i in rowArray){ counter = 0; data = headersArray[i].toLowerCase(); for(a in notEditable){ if(data == notEditable[a]){ counter++; } } if(counter > 0){ rowArray[i] += 'notEditable'; } } return rowArray; } it compares the header of the cell to an array of predefined values which = a non-editable column. Then I build the row: function buildHTMLTableRow(row, mutable) { output = ''; output += '<tr>'; for(var i = 0; i < row.length; i++) { value = trim(row[i]); if(mutable){ index = value.indexOf('notEditable'); if(index != -1){ value = value.substring(0, index); output += '<td>' + value + '</td>'; } else{ output += '<td><input size="5" type="text" value="' + value + '" /></td>'; } } else{ output += '<td>' + value + '</td>'; } } output += '</tr>'; return output; } if you not understand may see http://www.techyv.com/questions/html-code-problem |
« Next Oldest | Next Newest »
|