Stack Exchange
Adding multiple variables in the page URL using javascript
Since I'm relativly new to the use of php and javascript I ran into this problem while trying to add multiple variables in a URL
I use the following script:
<script>
function refresh() {
 var PCWDE = document.getElementById("PC");
 var NMWDE = document.getElementById("naam");
 var VNMWDE = document.getElementById("voornaam");
 var ONDWDE = document.getElementById("onderneming");
 var BTWWDE = document.getElementById("btwnummer");
 var LNDWDE = document.getElementById("land");


        this.document.location.href = "http://example.com/form.php?PCS=" + PCWDE.value "&nm=" + NMWDE.value "&vnm=" + VNMWDE.value "&ond=" + ONDWDE.value "&btw=" + BTWWDE.value "&lnd=" + LNDWDE.value;

}
</script>    

That's beeing activated trough the following html code:
    <?php
    $pc = $_GET['PCS'];
    echo '<input type="text" name="pc" id="PC" onblur="refresh()" value="'.$pc.'">'
    ?>

The main reason for the use of this html code was that I needed to execute a query without submitting the form, while still beeing able to hold the value of the text box even when the page would refresh. The above html code is used multiple times with the use of different ID's.
The problem I face while trying to do this is that my code only works when only adding 1 variable to the URL like so:
 this.document.location.href = "http://example.com/form.php?PCS=" + PCWDE.value;

Otherwise it does not work. Either the 'onblur' event fails to work, or the script fails to run.
Is there a way to add the multiple variables to the URL in a similiar way to what i'm doing now?

You forgot plus signs. That's a syntax error and you should see the error message if you open the error console. (on firefox you press control-shift-j)
Shoule be:
this.document.location.href = "http://example.com/form.php?PCS=" + PCWDE.value + "&nm=" + NMWDE.value + "&vnm=" + VNMWDE.value + "&ond=" + ONDWDE.value + "&btw=" + BTWWDE.value + "&lnd=" + LNDWDE.value;

