View Full Version : Help sending data from javascript to form

05-23-2012, 04:03 PM

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:
function removeRow(src) {
var oRow = src.parentNode.parentNode;
var temp = oRow.rowIndex;
document.getElementById('checkout').method = "get";
document.getElementById('checkout').submit(temp) ;

Any help is really appreciated.

Thank you

05-24-2012, 03:44 PM
Why use JS at all for this? Why not just create a "remove_item" function in your perl/cgi script?

05-24-2012, 03:51 PM
Yeah i have done that. But is it possible to send data or share data between javascript to perl script ?

05-24-2012, 05:06 PM
i have doe it before using ajax with php

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum