Solved

Jquery

Posted on 2015-02-17
2
101 Views
Last Modified: 2015-02-17
Hi Guys,

I have some jquery code in mvc application:

$('#po_type').change(function () {
if ($(this).val() == 3) {
var chx = $('#Vendor_to option:selected').val() == 14;
$('#Vendor_to').val() == chx;
}
 });              

Open in new window


what I would like to do is when I check "po_type" dropdown to 3 so the dropdownlist "vendor_to" change to vendor id to number 14 or to the vendor name. whatever work its k.


please help.
0
Comment
Question by:Moti Mashiah
2 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40615270
Hi,
this should work:
    $('#po_type').change(function () {
        if ($(this).val() == 3) {
            $('#Vendor_to').val("14");
        }
     });     

Open in new window

Sample:
http://jsfiddle.net/EE_RainerJ/fd6tp4f2/

HTH
Rainer
0
 
LVL 1

Author Closing Comment

by:Moti Mashiah
ID: 40615297
SOlved
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now