Redirect in Javascript with multiple query params
<p>I have this code :</p>
<pre><code>if($('#category').val() == 4){
   console.log(&quot;http://&quot;+window.location.hostname+'/dailyGift?id_event='+$( &quot;#sub-category&quot; ).val()+'?week_id='+$('#week_id').val()+'?year_id='+$('#year_id').val());
   window.location = &quot;http://&quot;+window.location.hostname+'/dailyGift?id_event='+$( &quot;#sub-category&quot; ).val()+'?week_id='+$('#week_id').val()+'?year_id='+$('#year_id').val();
}
</code></pre>
<p>In the console I have</p>
<pre><code>http://myWebsite.dev/dailyGift?id_event=41?week_id=44?year_id=2016.
</code></pre>
<p>When I access directly works without problems, but jQuery does not make this redirect and I don't understand where is the problem.</p>