Pass a value from a URL into a Drop Down List using Javascript
<p>I have a url as follows</p>

<pre><code>http://*****************?ContentId=1335&amp;clientName=Sam&amp;clientPhone=123&amp;clientEmail=an@gmail.com&amp;clientCountry=United%20Kingdom.
</code></pre>

<p>clientCountry is a name of a drop down list in my form and I want to pass the value (United Kingdom) into that drop down list using Javascript.</p>

<p>I have been able to do this so far</p>

<pre><code>function getUrlVars()
{
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') +    1).split('&amp;');
for(var i = 0; i &lt; hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
var first = getUrlVars()["clientName"];
var second = getUrlVars()["clientPhone"];
var third = getUrlVars()["clientEmail"];
var fourth = getUrlVars()["clientCountry"];
</code></pre>

<p>Now I do not know how to pass the variable fourth into the drop down list. Can anyone assist as I am a total novice with javascript?</p>
