sysadmin42
Technical User
- May 6, 2005
- 138
I wrote a script that is pretty cool in its function. Here's the overview: you have a db form page and on this page there's a hidden <iframe>. When you update a field in the form (onchange='update_database(...)'), javascript calls a page into the iframe that runs an update query. This saves having to click a button to update- especially nice for long forms where you risk losing all the data you just entered!
It's running on an internal intranet with a 1Gb backbone and it works like a charm.
By itself, passing a query to the hidden script is easy enough. But I have user permissions and login cookies. It's easy to have the script secure against those who are not logged in, but I need to process for permissions.
Right now, I just have several different scripts for different functions and permission blocks on each script. This is cumbersome- I really need to simplify into one script.
So... what I need your help with is simply an architectural approach to this idea. What pointers can you give for simplifying this? Your advice is much appreciated.
"Computer illiterate is a dirty word."
It's running on an internal intranet with a 1Gb backbone and it works like a charm.
By itself, passing a query to the hidden script is easy enough. But I have user permissions and login cookies. It's easy to have the script secure against those who are not logged in, but I need to process for permissions.
Right now, I just have several different scripts for different functions and permission blocks on each script. This is cumbersome- I really need to simplify into one script.
So... what I need your help with is simply an architectural approach to this idea. What pointers can you give for simplifying this? Your advice is much appreciated.
"Computer illiterate is a dirty word."