Please help!?
I am new to writing html, javascript, pretty new to MySQL but quite
proficient at writing Perl and i'm a quick learner.
I am building a database driven website and i am a little stuck:
I have page of results obtained from a MySQL query presented as a table (the
first column having checkboxes for each of the rows in the table, and all
having the name "seqs"). I have set up a javascript (connected to a "toggle
all" checkbox) that toggles the checked status of all the checkboxes in the
table. I have also included a submit button at the bottom of the table that
i would like connected to a javascript that passes document.hit_form.seqs as
an argument. Now this is what i want to do, but aren't sure how to go about
it:
i want to loop through the argument document.hit_form.seqs, and look to see
if it's checked by using:
for (i=0; i<argument document.hit_form.seqs.length; i++) {
if ( argument document.hit_form.seqs[i] == 1 ) {
}
}
If the checkbox is checked, i want to add the value associated with that
checkbox to an array (or comma seperated list - as a string).
I then what to pass the array/string to a cgi script, so i can use the
variable to query a MySQL database.
I then want the results to be saved to a file specified by the user via a
"save as" dialog box.
Please help!
Any pointer, would be very helpful!
Nathan