Hi,
I hope your code needs a minor repair only:
- somehow disappeared the <BODY> & <FORM ..> headings<BODY><form method="post" action="[I]./ThePage.php[/I]">
where ./ThePage.php should be overwritten with correct destination page name;
- the send() function was not extended:function send(oForm) { var inpF = oForm.getElementsByTagName('input'); for(i=0;i<inpF.length;i++) { inpF[i].disabled=false; } var inpF = oForm.getElementsByTagName('select'); for(i=0;i<inpF.length;i++) { inpF[i].disabled=false; } oForm.submit(); }
- a cosmetic cleaning could be:
var selN = oRow.nextSibling.getElementsByTagName('select')[0]; selN.selectedIndex=0;
in add(oRow)
- the
<TABLE> ... </TABLE>
definitely MUST be unformated in the code -> written as one single row, because, each [formating | invisible] character as spaces, tabs, and end of line can brake the structure of the DOM (Document Object Model) inserting the unwanted #text elements, hence the relative reference of the type:oElement.parentNode.nextSibling.firstChild
reffers to the invisible character instead of the next <INPUT> box.It is highly recommended to use frequently in FireFox the Error console (or whatever it has English name) and the DOM Inspector (available as free FF plugin). Lot of people use the FireBug plugin for direct debugging of the JavaScript code.
The database exploit seems to be well coded I hope it makes no problems.
I must again admit, that the styled document looks much better than the 'technical' skeleton only :-)
Sir i want to disable the textbox also.. if first textbox is filled then second textbox got disabled...vice versa..
I know i have to make changes in emtryStr() but i didnt find the right way..!!!
Help me out