php_b34st Posted October 21, 2006 Share Posted October 21, 2006 Im not sure if this can be done with php I think its done with javascript but there is no harm in asking right? I have seen sites with forms as soon as u do a certain thing on the form it loads more options without submitting ie if i change a radio button it would load a new set of options on the page. Anyone know if this can be done with php? Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted October 22, 2006 Share Posted October 22, 2006 Not with php, at least the client side portion is not php. I would have to be javascript.You can either load all of the values into javascript variables then manipulate the display based on selections, or you can use AJAX and some server side processing to generate html to replace portions of the page with. Quote Link to comment Share on other sites More sharing options...
mainewoods Posted October 22, 2006 Share Posted October 22, 2006 that can't be done with php, that is always done with javascript. php only activates when you load a page(calls the server). what you want is to use the onClick() event with your radio button and attach that to some javascript code that alters the dom. innerHTML is one easy dom element to use that has wide browser compatability. To lookup the actual syntax to use you'll need the wc3 javascript reference manual:http://www.w3schools.com/js/default.asp Quote Link to comment Share on other sites More sharing options...
php_b34st Posted October 22, 2006 Author Share Posted October 22, 2006 Yes I thought as much but I think that is beyond my capabilites for now. Thank you for verifying this for me. 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.