php-windows Digest 29 Jun 2010 03:50:57 -0000 Issue 3833

Topics (messages 30193 through 30196):

Re: Getting rid of bugs I never thought I would have
        30193 by: James Crow
        30194 by: Bill Mudry
        30195 by: Niel Archer

Re: Getting rid of bugs I never thought I would have. Nasty bugs are gone!
        30196 by: Bill Mudry

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
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.

Thanks,
James


--- End Message ---
--- Begin Message ---
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


--- End Message ---
--- Begin Message ---
> 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.

When I visited the site, there was an error in the generated HTML, so I
suspect your actual script in use is not identical to the one you
included in your mail.
The error was in the img tag generated for a specific wood. NULL as filename,
no quotes around url, and an extra '>' on the end.


> >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
> >

--
Niel Archer



--- End Message ---
--- Begin Message ---
At 08:43 PM 28/06/2010, you wrote:
> At 04:14 PM 28/06/2010, you wrote:
> >On 06/24/2010 09:16 PM, Bill Mudry wrote:

> ><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.

A great help, James, that idea worked! A great lesson for me to learn in coding.
I had probably forgot how using hidden form tags can be so useful to preserve
variables that way. The scans no longer disappear, yahoo!
<cut>

> 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.

When I visited the site, there was an error in the generated HTML, so I
suspect your actual script in use is not identical to the one you
included in your mail.
The error was in the img tag generated for a specific wood. NULL as filename,
no quotes around url, and an extra '>' on the end.

Thank you so much for your astute and careful effort in going over the code. You were right :-) . No kodos for me for forgetting to even examine the generated code. However, I found the errors you mentioned (including an open div tag) and corrected it. I then noticed I had temporarily commented the two needed $_get statement and un-commented them. That did it. The two informational show or not all in what the reader chooses to show -- just like they are supposed to!

Both of you are a huge help. It is so rewarding to see the species data report area working so well now. It is also, by the way, likely to be the most used function over time out of all pages. Seeing all this come together has been only in the form of a wish and dream for years until the past year or so.

Go try it out :-). (www.prowebcanada.com/taxa)

Much thanks,

Bill Mudry









> >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
> >

--
Niel Archer



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---

Reply via email to