I have written a Perl script which reads the contents of a Microsoft Access Database, and displays certain results as a web page table. The display criteria are determined by variables that are passed along to the script by a query string in the URL. For example, dep is the department name, num is the department number and sor is sort value. The script uses if, elsif statements and the sort number to determine how the data should be sorted. For example, if the sort number = 4, then sort the data by date. The table and data displays great when you first come to the page.
I would like to have the option of clicking on each of the column titles to then sort the table by that particular column. For example, the initial sort number is 1 which sorts the data by Document Number. I would like to be able to click on another column title, such as Document Title, and have the web page refresh and display the data sorted by that column.
I tried using <a href></a> html code, and made the link the same perl script that creates the web page. In other words, it links to itself, and passes along new values for the sort number in the query string. When I try this method, the page comes up blank. I have to force reload the page (in netscape) to get the table to show up with the new sorted data. Is there a way to do this where It will just display without having to manually force reload? Or is there a beter method?
Also, another problem I am running into, is that I need to use perl variables in the query string when attempting to re-sort/reload the table. This also makes the page not display (even force reloading will not make it work when I use variables in the query string). For example, the Department Number is stored in a variable called $deptnum, and in order for the reloaded page to know what department to look for in the database, this information needs to be a part of the query string.
Thanks for your help.
-King Dufus
I would like to have the option of clicking on each of the column titles to then sort the table by that particular column. For example, the initial sort number is 1 which sorts the data by Document Number. I would like to be able to click on another column title, such as Document Title, and have the web page refresh and display the data sorted by that column.
I tried using <a href></a> html code, and made the link the same perl script that creates the web page. In other words, it links to itself, and passes along new values for the sort number in the query string. When I try this method, the page comes up blank. I have to force reload the page (in netscape) to get the table to show up with the new sorted data. Is there a way to do this where It will just display without having to manually force reload? Or is there a beter method?
Also, another problem I am running into, is that I need to use perl variables in the query string when attempting to re-sort/reload the table. This also makes the page not display (even force reloading will not make it work when I use variables in the query string). For example, the Department Number is stored in a variable called $deptnum, and in order for the reloaded page to know what department to look for in the database, this information needs to be a part of the query string.
Thanks for your help.
-King Dufus