luvdairish
11-08-2004, 11:39 PM
I'm in desperate need of help. Please reply. :confused:
I'm reading data from a input file using PERL/CGI, then displaying each line in a HTML table.
My problem is, when the page is loaded I need to hide a (PERL) variable amount of the table rows using the ID attribute. The hidden rows will be revealed when a radio button is selected. I figure I could use a Javascript loop to hide each table row by ID when the page is loaded. The condition to break out of the loop would be a PERL variable.
Questions:
1. How do I assign a PERL variable to a Javascript variable for use as the condition to break out of the Javascript loop?
2. Is there a better way of doing this? Should I use all Javascript instead?
I'm better at PERL, so any suggestions please include examples.
I'm reading data from a input file using PERL/CGI, then displaying each line in a HTML table.
My problem is, when the page is loaded I need to hide a (PERL) variable amount of the table rows using the ID attribute. The hidden rows will be revealed when a radio button is selected. I figure I could use a Javascript loop to hide each table row by ID when the page is loaded. The condition to break out of the loop would be a PERL variable.
Questions:
1. How do I assign a PERL variable to a Javascript variable for use as the condition to break out of the Javascript loop?
2. Is there a better way of doing this? Should I use all Javascript instead?
I'm better at PERL, so any suggestions please include examples.