title: call action method with parameters MVC 4 javascript
body: <p>I'm tired and stupid, but heres my coding problem: </p>
  
  <p>We are using d3.js to draw on a google map element in the MVC4 action method called Live.
  We have implemented on click for the d3.js element and need to redirect from the javascript to another MVC action method.</p>
  
  <p>the action method "declaration" looks like this:</p>
  
  <pre><code>public ActionResult Visualization(String appId = "", String userId = "")
  </code></pre>
  
  <p>In javascript we have inside the d3.js function a code snippet that works and looks like this:</p>
  
  <pre><code>.on("click", function (d, i) {
          // just as an example use for the click-event. 
          alert(d.AppName); }
  </code></pre>
  
  <p>Where <em>d</em> has <em>AppId</em>, and <em>UserId</em> aswell.</p>
  
  <p><strong>What we now want to do is to create a redirect for the click event, calling the action method along with parameters from <em>d</em>. This means when you click the d3.js element you would be redirected to the other page with pre-set parameters.</strong></p>
  
  <p>We have tried things like:</p>
  
  <pre><code>window.location.href = "/StatsLocationController/Visualization/appId=" + d.AppIdentifier + "/userId=" + d.DeviceId
  </code></pre>
  
  <p>We also tried to use window.location.replace(), but none of it has worked, I guess we haven't figured out the correct syntax for the actionLink, but have a hard time finding examples when googling it. We are thankful for any help we can get!</p>