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? Link to comment https://forums.phpfreaks.com/topic/141177-php-question/ 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. Link to comment https://forums.phpfreaks.com/topic/141177-php-question/#findComment-738928 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. Link to comment https://forums.phpfreaks.com/topic/141177-php-question/#findComment-738944 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} } Link to comment https://forums.phpfreaks.com/topic/141177-php-question/#findComment-739421 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.