Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using output of perl / CGI as a variable in javascript.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,
I have a data file which contains an Item Code and Item Description - a flat file with a delimiter, one row per code-description combination.
I am accepting the Item Code on a form on my page.After the Item Code is accepted and focus is lost (onBlur Event in a Form field), I execute a Javascript function.I have written a javascript function similar to this:
(NOTE THIS IS NOT THE ACTUAL SCRIPT)
function get_item_description (item_code)
{
if (item_code eq '12345')
"do the 'item_code equals 12345' set of statements"
else
"do the 'item_code does not equal 12345' set of statements"
}
I have verified that the branching is correct for the item code being entered.
I would however like to execute a perl program (to which I supply the value of the Item code that was entered) and displaythe value which the perl program returns after processing.
Is there a way to do this?I would appreciate an early response.
Thanks and regards,
Uttam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top