PDA

View Full Version : Confirm box with Perl


Tejay
08-13-2002, 04:35 PM
How can I send the response of a confirm box back to the Perl script?? Example of my problem: In the form, the user tries to get a service for senior citizens, but the perl script knows that the user is only 25. I want to pop up a warning like "This service is for users 60 and over. Do you wish to proceed?". If they choose 'ok', how can I tell the perl script that the user wants to by pass this message and don't display it again. Since the user's age will not change, if I had a if statement in the script that will display this message when the user is under 60, unless I can tell it the response from the confirm box, it will display the message over and over. Any idea?? Thanks in advance.

AussieRules
08-14-2002, 07:09 PM
You are going to have to save the response to the question somewhere that your perl script can read. There are at least 3 ways that you might be able to use (but I can't tell you which without knowing your code)

1) write a hidden field using document.write ("<input type='hidden' name='passthru' value='Y'>") etc

2) use cookies to save the response

3) somehow add the response to the query string and read it back in your perl script