Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to get the value from database using web services..i have one dropdown and textbox.when i select drpdwn the selected value pass to the web service and return related data to fill the textbox..how to pass selected dropdown value to web service using javascript?
Posted
Comments
Afzaal Ahmad Zeeshan 31-Oct-15 7:49am    
You should look into ajax request in your web application. Ajax would let you send a request to web service.

Its very simple.
Please use json to request and responce data from Web Service.
Please follow the link for help
Prepare a JSON Web Service and access it with JQuery[^]

--
Happy Codding :)
 
Share this answer
 
jQuery AJAX[^] is the best way to make a call from client-side to the service.
Simple ajax call would be:
JavaScript
$.ajax({
  url: "your-service-url",
    cache: false,
    success: function(response){
    // response return from the URL
    },
    error: function(xhr){
    // always catch the error
        console.log(xhr.responseText);
    }
});


-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900