By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,935 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

dynamically assign text box id HTML

P: 1
Hello guys i want to dynamically assign the ids generated by this code to my text boxes in sudoku. Thanks

Expand|Select|Wrap|Line Numbers
  1. function generateID(cellnumber)
  2. {
  3. id=""
  4. for(var i=1;i<4;i++) 
  5.     for(var j=1;j<4;j++) 
  6.         for(var k=1;k<4;k++) 
  7.              for(var l=1;l<4;l++) 
  8. id+="t"+i+j+k+l+" ";
  9. id=id.split(" ")
  10. tableId=id[cellnumber]
  11. return tableId
  12. }
Dec 20 '13 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
why donít you just create & assign the IDs when you create the table cells?
Dec 20 '13 #2

Post your reply

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