, jquery, and web services for 2nd drop down

I have the following codes and need some helps

if inputState is selected then

   using jquery to call webservices and return a array like ('policy1','policy2','policy3')
   fill up the <select> value


   leave the <select> alone


<div class="controls">
<input readonly="true" class="customstyle" type="text" name="inputState" id="inputState"  />
                                        <masteritem  id="states" class="border">
                                            <item data-id="AL">Alabama</item>
                                            <item data-id="AK">Alaska</item>
                                            <item data-id="CA">California</item>
                                            <item data-id="NY">New York</item>
                                            <item data-id="WY">Wyoming</item>                                            

<div class="type control-group">
<label class="control-label" for="inputType">
Policy Type
<div class="controls">
<select id="inputBondType" name="inputBondType">
<option id="908">Policy1</option>
<option id="472">Policy2</option>
<option id="105">Policy3</option>
</div><!-- /.controls -->
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Where is your code that is doing the ajax request?
solution1368Author Commented:
have not done yet...can you show me how to do it in jquery?
solution1368Author Commented:
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

It's too late for me now, will get back to it tomorrow if no one else takes it on.
Monica PSoftware DeveloperCommented:
This is the sample to load the data with webservice call in AJAX

<script language="javascript" type="text/javascript">
$(document).ready(function() {
type: "GET",
url: "../WebService.asmx/FindAllCountries",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(response) {
var ddl1 = response.d;
for (var i = 0; i < ddl1.length; i++) {
var selectOption = $(document.createElement(‘option’));
failure: function(errMsg) {

Open in new window

Refer this link for detailed code for the  Dropdown list upload
Tutorial for webservice call in ajax

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
solution1368Author Commented:
i need working codes with my codes that I posted.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.