On Jun 11, 2006, at 1:21 PM, Rafael wrote:
jekillen wrote:
[···]
You misunderstand my question. I know the limitations of javascript.
The server won't respond to events registered in the browser. I write
tons of forms that are all processed
by the client with javascript. I have written ferocious regex filters
that hack apart form submissions before they even leave the client. I
have set it up so if the client doesn't
have javascript enabled, the form won't submit if it is going to the
server. That is why as much as possible I shift form processing to
the client as much as possible, for
security and to off load work to the client. I use php to dynamically
write js files when necessary, anticipating what data will be
requested.
I didn't (misunderstood), what I told you is that you cannot rely on
javascript (actually, that would be "anything coming from the client")
You need to do validate on the server, and it doesn't matter if you
already did it on the client or not (simply because you cannot know
that for sure)
This is a problem that is more a matter of programming theory. I have
posted to javascript forums and lists and have never got a response.
I will be applying this to dhtml which the server won't and can't do
but may help things along with Ajax.
Just a simple suggestion about how to reorder arrays if you have a
few words and suggestions. I'm not looking for free training.
I have been learning and using php and javascript for some five years
and have developed my own approach to testing and debugging
and such. So I am not really a newby. I have made the dumb mistakes
of asking for help from forums and lists when it was just a dumb
syntax error that I couldn't expect anyone but my self to find, which
i have in 99.9% of the cases. Some times it is nice to get some
quick help from a list and I will try to return the favor when ever
possible to the next person looking for help that I have some answers
for.
Well, I asked you for the actual (JS) code you're using (the one that
didn't work in all the intended browsers), that way someone might be
able to help you (I will if I can)
Array.push(), Array.pop(), Array.shift(), Array.unshift().
I thought that if I used Ajax, php could use its push and pop, shift
and unshift functions, but not all browsers support the asymetric
requests.
I do screen in the server. But I force the user to have javascript
enabled and force the form to submit using javascipt, and have a unique
id as a javascript variable
that is sent along with the form in a hidden field to identify the
source of the form data. I never use get requests unless they are
appended to anchor tags, even
in forms that are not processed by the server (I.E. running javascript
code with user supplied arguments to functions via form fields, in
which case an action attribute
isn't even necessary, and like wise a post or get method).
JK
--
Atentamente / Sincerely,
J. Rafael Salazar Magaña
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php