Forum Moderators: phranque
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
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.
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.