When I say that I have honestly tried for a couple hours but I can't seem to get anywhere with it...
I am writing a little selector script to allow a user to select multiple options and then create a url dependent on the options the user has selected.
<div onclick="generate_url('data input by php')">A button</div>
<div onclick="generate_url('different data)">A different button</div>
<div class="view_mode" onclick="change_mode('single')">Singular</div>
<div class="view_mode" onclick="change_mode('dual')">Dual</div>
// Function to change view mode (working)
mode = newmode;
//Standard url that users selections are added to
// Function to generate a url or mutiple url's based off user input
//Allow user to choose a single option
window.location.href = singular_url;
window.location.href = dual_url;
(I can go ahead and change out the final url myself that's not the problem)
The problem is to do with the count it automatically jumps through the script and adds the first selection twice then loads the page before you can select a second option.
I attempted to move around the if statements however this had no effect.
Could someone point me in the right direction