Re: Getting rid of bugs I never thought I would have
Bill Mudry <[email protected]>
| Newsgroups | gmane.comp.php.windows |
|---|---|
| Message-ID | <[email protected]> |
At 04:14 PM 28/06/2010, you wrote:
>On 06/24/2010 09:16 PM, Bill Mudry wrote:
>>Overall, I am happy with the progress on my pet TAXA project but
>>the journey is proving to be like riding over a rocky road. The
>>most recent effort at a functional addition has been a form to let
>>users decide whether 2 of three types of data will show (general,
>>woodworking & numeric). The general
>>data for each wood should always so and the users should be able to
>>choose if either or both of hte other two should show (using include files).
>>
>>At first in the form's simplest unformatted form, I got it working
>>fine (and I rejoiced ....). Then when I tried to put it into a
>>table to pretty it up again --- I would no longer work (...
>>almost). I tried all kinds of things. If you temporarily hardcode
>>the choices, the two tables show or do not as desired. Somehow
>>the user choices are not latching to the control lines. Every time
>>you click on the submit button
>>(named ''Choose Data to View"), it cycles back to the same page
>>like it should.
>>
>>Now the weird things start. Yesterday, in reviewing everything
>>before submitting to this forum, I
>>decided I should try it again ---- and to my astonishment for a
>>while --- it worked! I could choose
>>the working data checkbox, the woodworking checkbox or both and
>>they would show. Don't
>>check either and they didn't show just like should be. That was
>>short lived, though(!). It hasn't
>>worked since. Ahem..... talk about flaky.....
>>
>>But then I noticed another problem. To activate the user choice you
>>have to click on the submit button of course. When I cycled through
>>is when I noticed that now on species detail sheets that
>>are set up to show a scan of the wood being reported on the scan
>>that first showed disappears,
>>leaving only the 'missing' graphic' symbol only.
>>
>>So now I have two consternating problems:
>>
>> 1 - How do I get the form to let users choose what data
>> tables to show to work consistently
>> well all the time? If it works mysteriously some of
>> the time, my code should be fairly
>> close to what it needs to be <fingers-crossed>.
>>
>> 2 - How do I keep the scan showing always? I realize that
>> each time the submit button is
>> hit, the location for what scan file (all .jpg)
>> should show gets lost. All scans are kept in
>> and alphabetical list of folders according to the
>> first letter of the (botanical) name of the wood being showed:
>> /taxa/wood_scans/gallery_a/<filename>
>> /taxa/wood_scans/gallery_b/<filename>
>> /taxa/wood_scans/gallery_c/<filename>
>> /taxa/wood_scans/gallery_d/<filename> and so on, but have been loaded into
>> the 'species' MySQL file (species.sql) also in
>> column 'picture_filename'.
><snip>
>
>1) Fix 2 and I think 1 will be more easily traced.
>2) I did not see that you were keeping the species_name once the
>user clicks on "Choose data to view." You could add a hidden input
>field that saves the value and returns it to the script. Something like:
>echo "<input type='hidden' name='species_name' value='{$species_name}' />";
>Once the user clicks the button to select the data they want to
>view, PHP has no idea what species they were viewing.
That might be a good suggestion, James. I will try this shortly
tonight. I will let you know after.
Can you possibly figure out why the form is working so flaky, now? As
above, it worked when not in a table for formating (quite well at one
early point), basically has not worked except briefly one morning
(without any code change I know.....) and not since. I just checked
now and it doesn't work.
The URL at the top shows as
http://www.prowebcanada.com/taxa/displayspecies.php?show_woodworking=OFF&show_numeric=OFF
and that is even after I have chosen both user check boxes on and
clicked on the submit button. Both should read on but both show OFF.
>Thanks,
>James
Here's hoping that you or someone can catch what I have not quite
coded correctly.
Bill
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>