I am adding a subroutine will open a specific file (an Adobe Acrobat file) in a separate window.
This works great when I have a static file name, I just have a list of links with each link looking like:
print qq!<dd><li><a href="$db_pdf_url/$rpt_barcode" target="_blank" name="Barcode" title="Districtwide Barcode Report"><b>Barcode Report</b></A><BR>! if ($per_reports);
Now I have a form, that has a select box (built from a separate DB) that lists specific sites
and a submit button that says "Select Report"
what I want to do when the form is submitted is build the url to the specific site selected by the user and then open the new window as it does above when I have a static report I'm linking too.
I can hardcode the file names in the external DB that the form uses to do the select box.
Can someone help me write the code that happens on the submit?
Example:
Select list is: School A
School B
School C
and file name is 041_scha.pdf for school A but 04a_schb.pdf for school B and 04a_schoolc.pdf for school C.
so my external db has 3 fields
District 1|School A|041_scha.pdf
District 1|School B|04a_schb.pdf
District 1|School C|04a_schoolc.pdf
Now the trick that I haven't figured out, is writing whats in field 3 into the url as a variable when the user submits the select showing the site name stored in field 2 which is based on the DB they are using (field 1).
Thanks for any help. I hope this is clear!
Lynette
Hollister, Ca
This works great when I have a static file name, I just have a list of links with each link looking like:
print qq!<dd><li><a href="$db_pdf_url/$rpt_barcode" target="_blank" name="Barcode" title="Districtwide Barcode Report"><b>Barcode Report</b></A><BR>! if ($per_reports);
Now I have a form, that has a select box (built from a separate DB) that lists specific sites
and a submit button that says "Select Report"
what I want to do when the form is submitted is build the url to the specific site selected by the user and then open the new window as it does above when I have a static report I'm linking too.
I can hardcode the file names in the external DB that the form uses to do the select box.
Can someone help me write the code that happens on the submit?
Example:
Select list is: School A
School B
School C
and file name is 041_scha.pdf for school A but 04a_schb.pdf for school B and 04a_schoolc.pdf for school C.
so my external db has 3 fields
District 1|School A|041_scha.pdf
District 1|School B|04a_schb.pdf
District 1|School C|04a_schoolc.pdf
Now the trick that I haven't figured out, is writing whats in field 3 into the url as a variable when the user submits the select showing the site name stored in field 2 which is based on the DB they are using (field 1).
Thanks for any help. I hope this is clear!
Lynette
Hollister, Ca