Reaper0167 Posted January 17, 2009 Share Posted January 17, 2009 lets say i have a div with a couple of text fields on my site. after i click on a button,,,, could i have something different display inside that same div instead of the text fields? Can this be done with only using php? Quote Link to comment Share on other sites More sharing options...
ratcateme Posted January 17, 2009 Share Posted January 17, 2009 it is more a javascript thing if you want to do it without loading the whole page again. if you want to use php to help the javascript load the div you need AJAX. if you are not to good at javascript/ajax check out the xajaxproject it is very easy to add to a current php application. Scott. Quote Link to comment Share on other sites More sharing options...
Reaper0167 Posted January 17, 2009 Author Share Posted January 17, 2009 i don't mind if the page reloads itself... as long as it is still the same page name in the url. Quote Link to comment Share on other sites More sharing options...
dawsba Posted January 18, 2009 Share Posted January 18, 2009 if u dont mind reload best way would be to do a get in your button call ie a href=thispage.php?div=2 on your script have somthing like switch($div) { case: 1 case: 2 {script here break} } 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.