truegilly Posted February 8, 2007 Share Posted February 8, 2007 Hi People ive seen this on many e-commerce website and im sure you have too. lets say you have a HTML drop down box and when a user selects a particular value something happens at runtime, like the page refreshes or some area of the page is altered. A good example was on a UK train company website i used to buy tickets from. When you select "railcard" from the drop down box the form adjusts to fit that selection without the browser redirecting to another URL. heres my simple box HTML code.... <select name="type"> <option>Please Select</option> <option value="Risk">Risk</option> <option value="Issue">Issue</option> </select> what i would love to be able to do is if a user selects "Issue" one of the form fields within the same page is removed. i was thinking about attempting this with the PHP code below... if ($_POST['type'] = 'Issue' { do something to the form } else { dont cahnge anything ! } the thing that is puzzling me is how this can be done at runtime. Is this at all possible in PHP ?? or is it a javascript thing. ??? Thank you for any help Truegilly Quote Link to comment Share on other sites More sharing options...
only one Posted February 8, 2007 Share Posted February 8, 2007 thats done by javascript Quote Link to comment Share on other sites More sharing options...
truegilly Posted February 8, 2007 Author Share Posted February 8, 2007 I thought as much thanks anyway 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.