- Joined
- Jan 19, 2007
- Posts
- 2,207
- Reaction score
- 47
Ok a bit tricky to explain but hopefully someone will understand me and can help 
I have a series of 3 dropdown boxes.
You selct and option from the first and it updates the options in the second drop down.
You then select an option in the second and it fills the options in the third drop down.
Now I've managed to create all of this with javascript code. But this is with the all of the options and information being in the html. So anyone can view source and see all of the options which I'd prefer not to happen.
That's the first and smaller issue. The second issue is that my test script (javascript) which achieves the above, is only for a few 50-ish entries for each dropdown. My final project could have a few thousand entries in a db that I would need to display as entries, and as entries are added to the database I would want these options to be automatically available for people to select in the dynamic form...
I'm looking for a solution which the entire database wouldn't be exposed by people viewing the source of the page.
I think if javascript is used (even by php pulling the the information by arrays to create the javascript) then this information would be exposed. Or is there a way to hide the javascript code (containing the db info) inside the page header or hiding it somehow in the body.
Or should I forget javascript altogether and just do something with php and reloading the page...
A bit of a tricky one - any thoughts appreciated...
I have a series of 3 dropdown boxes.
You selct and option from the first and it updates the options in the second drop down.
You then select an option in the second and it fills the options in the third drop down.
Now I've managed to create all of this with javascript code. But this is with the all of the options and information being in the html. So anyone can view source and see all of the options which I'd prefer not to happen.
That's the first and smaller issue. The second issue is that my test script (javascript) which achieves the above, is only for a few 50-ish entries for each dropdown. My final project could have a few thousand entries in a db that I would need to display as entries, and as entries are added to the database I would want these options to be automatically available for people to select in the dynamic form...
I'm looking for a solution which the entire database wouldn't be exposed by people viewing the source of the page.
I think if javascript is used (even by php pulling the the information by arrays to create the javascript) then this information would be exposed. Or is there a way to hide the javascript code (containing the db info) inside the page header or hiding it somehow in the body.
Or should I forget javascript altogether and just do something with php and reloading the page...
A bit of a tricky one - any thoughts appreciated...