Re: Re: How to re-order an array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jun 10, 2006, at 5:32 PM, Rafael wrote:

Since you asked for some theory... theorically, you won't rely on javascript to prepare/validate/whatever some data to the server, that's what server-side scripts are for. Note: you may use JS to make things quicker if possible, or to pre-digest the data, but you shall not rely entirely on JS.
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. 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.

You say that not all browsers support the javascript functions you pretend
'scuse me, did i "pretend" to use something??

to use, and that not all them support Ajax either. That sounds just like saying that not all browser will have javascript enabled --that's why you shouldn't rely on javascript

Although, this isn't a javascript list, why don't you send whatever you were trying to solve this issue? the code that uses JS functions not supported for all the browsers that will potentially run the script (as well as what these browsers are) Most likely someone will be able to help you this way.
Thanks for the attitude.
jk

jekillen wrote:
Hello;
i'm scratching my head with a difficulty.
The situation is this.
A script begins with one indexed array (not associative) and one other indexed array
with the same values in a different order, the final order.
I want to create an interim array and progressively re order the array until it matches slot for slot one of the original arrays. At this point the script is considered completed. One important factor is that I'm looking to write this in javascript and the interim
array will be altered by the actions of a web page user.
Why am I asking the php list? Because I have a better chance of getting an answer here. I'm not looking for help with javascript, specifically, just how one would go about this task. Answer with php code and some theory if you wish and I will try to translate
it into javascript.
Some javascript functions I might use aren't supported in all the browsers that will
potentially run the script.
I might resort to using Ajax and let php keep track for me. But, then again not all
browsers will do the Ajax either (as I understand it).
--
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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux