Hello friends,
I know this is a java forum but I have a question on accessing html elements in python script. I am stuck currently trying different options and none seem to work. My problem is described below.
I have a form with table and i have some javascript code to add rows and delete rows on a button click. User enters data and submits the form. At Back end , python script gets invoked and it needs to use the data entered in table for additional processing. I do not know how to do that. I can use Beuatiful Soup but all the examples mentioned are having some hardcoded html and then creating a soup instance..In my case that html has to come from the request.
so beautigul soup does not work for me with my knowledge.
Can someone tell me how can I access the html table data in a python script? Any other ideas are also welcome. Sorry for posting python q here.
my javascript code:
var newRow = document.all("tblGrid").insertRow();
//add 3 cells (<td>) to the new row and set the innerHTML to contain text boxes
var oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='categoryname' size='30'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='itemid' size='30'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='itemname' size='30'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='quantity' size='30'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='text' name='attributes' size='60'> <input type='button' value='Delete' onclick='removeRow(this);'/>";
Thanks,
Radha