Radhika Posted October 9, 2008 Share Posted October 9, 2008 hi...I am creating this web site in PHP. But i am having problems in manipulating the tables.For eg. I have a combo box in which i have several options like - add , delete etc.When i click on 'add' i want a row to be inserted automatically. Now there are certain cells that are to be automatically filled in. Each inserted row has a cell containing a check box. How to inserted such rows, which already has a check box in it??? This event is generated when the user click on the add option. I have used onChange() function of javascript for it. kindly help.......There are several other manipulations that i am unable to do. But i thought of going one at a time.... Link to comment Share on other sites More sharing options...
Ingolme Posted October 9, 2008 Share Posted October 9, 2008 You're going to need Javascript and DOM to work with it. PHP doesn't change the page dynamically. It can only do things before the page has loaded.Here are some Javascript methods you may find helpful:insertRow()insertCell() Link to comment Share on other sites More sharing options...
Radhika Posted October 11, 2008 Author Share Posted October 11, 2008 i used insertRow() and deleteRow().....nd yes i did find out that il have to use DOM nd JavaScript..........but then the problem with it is* i can insert a new row, but i want a check box to come with it automatically and some more things like Serial nos to be incremented automatically....also id like to know how to enable cell editing??? Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted November 3, 2008 Share Posted November 3, 2008 If you want something to incremented, you are obviously inserting them at the bottom, so you can just check the appropriate cell at the last row for the value and then add 1.As for cell editing, that would be JavaScript, but the contents would be deleted when you navigated away from the page/closed the tab. Link to comment Share on other sites More sharing options...
Synook Posted November 3, 2008 Share Posted November 3, 2008 As for cell editing, that would be JavaScript, but the contents would be deleted when you navigated away from the page/closed the tab.Unless you used AJAX to save the data onchange, or provided a submit button. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.