The script for creating the tables is as follows;
Expand|Select|Wrap|Line Numbers
- <script type="text/javascript"><!--
- function fboxes(NumberOfBoxes){
- var i,boxes='';
- for(i=0; i<NumberOfBoxes; i++){
- boxes += "<table width='400' border='0' cellspacing='0' cellpadding='0' align='left'><tr><td><strong>Location</strong></td><td><input type='textarea' name='locbox["+i+"]' id='locbox["+i+"]' size='30'></td></tr><tr><td colspan='2'><div align='center'><strong>Incident Details</strong></div></td></tr><tr><td colspan='2'><textarea name='textbox["+i+"]' id='textbox["+i+"]' cols='35' rows='8'></textarea></td></tr><tr><td colspan='2'><div align='center'><strong>Business Impact</strong></div></td></tr><tr><td colspan='2'><textarea name='bimpbox["+i+"]' id='bimpbox["+i+"]' cols='35' rows='8'></textarea></td></tr></table>";
- }
- document.getElementById('currentissues').innerHTML = boxes;
- }
- --></script>
What i need though is some validation for the boxes, namely, that if there is a table then the locbox[] field has to have text in it.
Each time I've tried to write the validation part for this section it says that "locbox" isn't defined, yest it is (as in the script above).
Any help at clearing this up and simplifying arrays would be greatly, muchly, enormously appreciated.