Forum Moderators: phranque

Message Too Old, No Replies

Processing variables through users local files

New Years resolution to make my site more accessible

         

Jeremy_H

8:04 am on Jan 2, 2006 (gmt 0)

10+ Year Member



I guess it's turning into one of my New Year's resolutions--to make my site more accessible.

I have a software program where users highlight a word in their browsers, and then search mine and a couple other databases by these words.

I already have it figured out, but what happens is the word is preprocessed through an html file in the installation directory on the users computer, before redirecting the user to the destination page.

Right now the file that does the pre-processing is a simple html file with a bit of javascript that takes a variable and runs it across a couple of checks to see what page online to send the user to.

Since it uses javascript, it only works on computers with javascript enabled.

So, I'm thinking if I rewrite those files to use something else, the program would be more accessible.

Would PHP be a better choice, and would it do it's processing even if it was located on a users computer? Or is something else more appropriate? Maybe this concept is just limited to Javascript?

Thanks

sharbel

2:15 pm on Jan 2, 2006 (gmt 0)

10+ Year Member



If I am understanding you correctly, their is a file of some sort on the client that is pre-processed? If so, PHP/ASP(.NET) etc isnt going to have access to that file without it being uploaded/posted.

You have to remember that they (PHP etc) are *server-side* technologies. So the scripts are being executed on the server, whereas Javascript executes on the client.

Jeremy_H

6:28 pm on Jan 2, 2006 (gmt 0)

10+ Year Member



Thanks for the reply.

So even if the PHP file was installed on the user's computer, it still won't act as the server?

Does that mean JavaScript would be my only choice? Or are there other client side languages that would be more compatible?

Thanks

sharbel

4:24 am on Jan 5, 2006 (gmt 0)

10+ Year Member



You cant just have a PHP file execute on the user's computer. It just doesnt work that way. PHP (or any server side framework for that matter) executes on the server and delivers the content to the user. All processing/calculations etc etc is done on the server.

If you want things to be executed on the client (the person browsing the website), you typically would do it via javascript, or some kind of java-applet or ActiveX/Hosted Winform type application, which would execute on the user's computer. Typically, there are security issues when you are doing an applet/ActiveX/hosted-winform type solution. The user has to download and 'install' or agree to a security message for the component to run.