I have been diving into AJAX through a couple of books, but I am still relatively new at it. All the resources I've come across offer examples of auto-populating search bars and asynchronous form validators. While those are valuable, they are not exactly what I'm looking for. What I want to achieve is clicking a button that will switch the external CSS file included in my header. Is this doable? I know it's possible, but how can it be done?
PS: jQuery is part of this project, so if there is a built-in way to accomplish this using jQuery, it would be ideal!
PPS: I just realized that I left out some important details (please don't shoot me!):
The ultimate goal is to create a user settings section where users can select their preferred color scheme by clicking radio buttons. We plan to offer around 8 different CSS styles for them to choose from. I'm not sure if this changes the optimal approach to implementing this.
Users will log into their accounts to make these changes. I want their choices to remain effective until they decide to modify the stylesheet again. I can manually update this in MySQL since we have a table named 'stylesheets' with numbered user stylesheets... essentially, what I need to do is asynchronously update that MySQL value to ensure the CSS loads immediately.