Making intelligent forms with Perl/ CGI?

  • Thread starter Thread starter Bes
  • Start date Start date

Bes

Bes

Soldato
Joined
18 Oct 2002
Posts
7,318
Location
Melbourne
Hi

I want to make a form for a website but make it intelligent (i.e. when you click on a radio button, options appear according to what you have pressed, hitting next brings up new options etc)

Any ideas how I do this please? (i.e tutorials)

Thanks
 
You can just use simple javascript to bring up options and such. Just change innerHTML etc to add buttons or whatever you need. Ive never used perl so cannot comment on its use, for CGI I always use python. Python functions can also be called directly when the form is submitted.
 
Hmmm trying to kludge CGI, Javascript, and CSS together is proving difficult.... I think I am going to force myself to learn PHP 'on the job' as it seems much easier to make a web app.
 
Hi

I want to make a form for a website but make it intelligent (i.e. when you click on a radio button, options appear according to what you have pressed, hitting next brings up new options etc)

Any ideas how I do this please? (i.e tutorials)

Thanks
If you want the form options to update in real time without appearing to reload the page then some simple Javascript will do the job.

However unhiding data with Javascript is not exactly elegant and if you have a number of options (especially if dynamic) to show then you would be better off using AJAX (Javascript to call AJAX, which populates the data).

Perl & CGI are really used for processing submitted data in the same way ASP, PHP, etc are.
 
Last edited:
Back
Top Bottom