may I ask this question? - Page 3

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: may I ask this question?

On 18/07/10 00:52, Jerry Stuckle wrote:

Quoted text here. Click to load it

Yes, that's why I'm asking questions that I hope will make him think
about what he's doing, rather than feeding him solutions.

For example, he stated that he wants to solve the problem of identifying
which fields don't contain 'na', when the only reason they contain 'na'
seems to be that his client side javascript processing puts it there,
and he intends to remove that processing later.

I'm asking why he doesn't skip straight to removing the javascript code
that puts the 'na' in the presumably empty fields.

I have a suspicion that the reason he's doing that is because he's
"adapted" some javascript form validation code from somewhere and that
code is requiring a value in a field that he actually doesn't want to
force a value in.

Now me and you, if we wanted to check that say 5 of 16 form fields
contained data in javascript, would probably check each field in turn,
incrementing a counter if it contained data, and checking at the end
that the counter was in an acceptable range.

Mind you, if we were validating form data client side with javascript,
we'd probably be doing more than just checking the field wasn't empty as
well. Regex matches and string lengths come to mind.


Denis McMahon

Re: may I ask this question?

On Sun, 18 Jul 2010 18:26:24 +0100, Denis McMahon

Quoted text here. Click to load it


I've made a good start. The 'na' part has almost gone! It's trickly
because there are several options for the user, to go forward, go
backwards or stop and save. My original method taking the easier route
was to send all the values, including those not used to the php file
and then remove the unused ones there. This will certainly be better.

Quoted text here. Click to load it

No! In this case it's all my own work! By the way I'm not saying that
absolutey against taking and ammending code though...



Site Timeline