mailmeakhila
05-23-2012, 04:03 PM
Hi
I am writing a shopping cart in perl/cgi. I have a page where i am trying to give a delete button to delete items from shopping cart. I have written the following code to delete from the html and send that row value to the perlscript to delete it permanently(as it can reapper if page refreshes just by deleting html). I am having trouble accessing value submitted by javascript to my cgi script.
Below is my code:
<code>
function removeRow(src) {
var oRow = src.parentNode.parentNode;
var temp = oRow.rowIndex;
document.getElementById("cart").deleteRow(temp);
alert(temp);
document.getElementById('checkout').method = "get";
document.getElementById('checkout').submit(temp) ;
}
</code>
Any help is really appreciated.
Thank you
Akhila.
I am writing a shopping cart in perl/cgi. I have a page where i am trying to give a delete button to delete items from shopping cart. I have written the following code to delete from the html and send that row value to the perlscript to delete it permanently(as it can reapper if page refreshes just by deleting html). I am having trouble accessing value submitted by javascript to my cgi script.
Below is my code:
<code>
function removeRow(src) {
var oRow = src.parentNode.parentNode;
var temp = oRow.rowIndex;
document.getElementById("cart").deleteRow(temp);
alert(temp);
document.getElementById('checkout').method = "get";
document.getElementById('checkout').submit(temp) ;
}
</code>
Any help is really appreciated.
Thank you
Akhila.