title: passing value from javascript to partial view in mvc
body: <p>the given below is my script</p>
  
  <pre><code>var selectedImage;
  
  function select(image) {
    var images = document.querySelectorAll('img');
    var index = 0, length = images.length;
  
    for (; index &lt; length; index++) {
      images[index].classList.remove('selected');
    }
  
    selectedImage = image.id;
    image.classList.add('selected');
  
    var image = document.getElementById(selectedImage);
    var audioId = image.getAttribute('data-audio')
    var audioElement = document.getElementById(audioId);
  }
  </code></pre>
  
  <p>Now i want to pass the value of "audio element (which contains the Url of an audio fetched from database)" to another function which is defined in partial view. How to do this? please help.</p>