0

what I want to do is the following I have a .js where I have a code that I want to work but I have to pass some parameters

<script src="~/Scripts/Test.js?controller=1111" />

js file

control male

function TrackLayout (layout) {

     var value = controller;
     if ($ ('# gvlayout' + value) .val () === '') {
         $ ('# gvlayout' + value) .val ('');
         $ ('# gvlayout' + value) .val (layout);
     }
     $ ('# gvlayout' + value) .val (layout);
}
Ivar
  • 6,138
  • 12
  • 49
  • 61
ascariz
  • 13
  • 1
  • 4
  • It is not clear what do you want to achieve, JS file does not receive parameters like this, you can read current page url parameters in js... – kolodi Dec 15 '17 at 13:52
  • I want the file js can get the controller value that goes in the url – ascariz Dec 15 '17 at 14:00

0 Answers0