Welcome coleb1115,
I am not an expert nor have I used Ajax, but I do use javascript with HTML to validate and populate form fields to be forwarded to Perl via cgi. I believe Ajax is used for continuous communication with a cgi program/script.
What you want can be done with javascript, by using the 'onClick' in the HTML. For example the following HTML will call a javascript subroutine called 'checkInfo' when the 'Login' button is clicked.
<INPUT type=submit value=Login name='ULogin' onClick="return checkInfo +();" />
The 'checkInfo' subroutine should set the fields in the Form for submission to the web server.
But, I think you could get what you wanted easier with just a drop down box with the info in table 1, that sends to your Perl script the single item selected, and then to generate a new response HTML document with the related contents of table 2 as another drop down box. (google 'select' for examples).
Whatever your solution, it will take some time before you understand the full picture, but once you understand the relationships, it will be fun to expand and innovate.
Good Luck...Ed
"Well done is better than well said." - Benjamin Franklin
In reply to Re: How to store the value of a Javascript function as a Perl variable
by flexvault
in thread How to store the value of a Javascript function as a Perl variable
by coleb1115
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |