Hi,
I'm currently putting together a stylesheet switcher for a project I'm working on, it's a server side solution at the moment, and I'd like to AJAX it up and avoid page reloads. I'm using Prototype's Ajax.Request method like so:
And all seems to work fine(ish). My only problem is that you have to reload the page before the stylesheet changes, I'm guessing I have to do something involving the onComplete callback, but what I'm not sure. The page in question is here:
Any help you can offer would be great, I'm a bit of a JavaScript n00b and have tried to figure it out for myself, but I've hit a brick wall!
I'm currently putting together a stylesheet switcher for a project I'm working on, it's a server side solution at the moment, and I'd like to AJAX it up and avoid page reloads. I'm using Prototype's Ajax.Request method like so:
Code:
function resizetext(size) { new Ajax.Request('resize.php', {method: 'get', parameters: {style: size} }); }
Any help you can offer would be great, I'm a bit of a JavaScript n00b and have tried to figure it out for myself, but I've hit a brick wall!
Comment