Cai Posted November 21, 2013 Share Posted November 21, 2013 here is my code: <input type="radio" name="SearchIDItem" value="Dept">Department <input type="radio" name="SearchIDItem" value="CatItem">Category Item <input type="radio" name="SearchIDItem" value="OfficeSupplies">Office Supplies if i click "Department" it will echo a Department same also with other radio button. Thanks a lot. Quote Link to comment Share on other sites More sharing options...
.josh Posted November 21, 2013 Share Posted November 21, 2013 be more specific.. is the value a static value you want to show? Or is it pulled from a database or what? Quote Link to comment Share on other sites More sharing options...
Cai Posted November 21, 2013 Author Share Posted November 21, 2013 it is a static value to query on my database. if i choose Department i will query data on my table Department and pass it on a combobox in html. Quote Link to comment Share on other sites More sharing options...
.josh Posted November 21, 2013 Share Posted November 21, 2013 Okay, well basically you want to add a click event listener that invokes an AJAX call onclick. The AJAX call should make a request to a controller script that queries your database based on the value and returns results. Then in the AJAX response callback, do something with the results. This is essentially a basic AJAX tutorial scenario, literally thousands of tuts for it out there. Look one up and if you get stuck on something in particular, feel free to post a specific question. Quote Link to comment Share on other sites More sharing options...
Cai Posted November 21, 2013 Author Share Posted November 21, 2013 Ah..so it is ajax function..thanks a bunch for the reply and explanation.. 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.