TheFilmGod Posted January 10, 2008 Share Posted January 10, 2008 I have 5 different buttons on the top of every page. I want a user to be able to click on the top on any page and change it to what they want. This isn't a form but is a <ul><li></li></ul> . I was thinking to make it a link that redirects the user to go that page that processes the php, but then I want the php code to redirect them back. So in summary, I want php code to be executed without them being redirected. I know ajax is possible but I don't want to rely solely on javascript... Any suggestions? Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted January 10, 2008 Share Posted January 10, 2008 Well you won't need to rely solely on JavaScript. Just the clicking part and calling the PHP part. That's it. Quote Link to comment Share on other sites More sharing options...
nikefido Posted January 10, 2008 Share Posted January 10, 2008 sounds to my like you know your options. 1) take them to the processing page which will redirect them back to the original (usually fast enough so they don't even know what happened) I would suggest creating a message so the users know that the process was finished successfully after redirecting you back (if it's not obvious by itself) or 2) ajax it, which relies on JS and PHP ======= My solution would be both, of course there's a reason the <noscript> tags exist! If JS can't be used on the users browser, then you set up your page to go to the php and make those sum-bitches who turn off their JS reload the page. If JS CAN be used, then the AJAX works, and everyone is happy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.