Solved

Jquery

Posted on 2015-02-17
2
110 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
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…

695 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