Max budget for this project is $10.
The Issue: The code below can't process parameters with spaces, percent signs or () in it.
Example URLS:
[login to view URL] (awf_first)=first&name (awf_last)=last&email=email
[login to view URL](awf_first)=first&name%20(awf_last)=last&email=email
The code below needs to be able to parse the parameters above and fill a form with the values.
Please don’t take away any functionality of the script, just add the ability to process the above URL examples.
-Thanks
Here is the code:
<script type="text/javascript">
function _id(e){return [login to view URL](e)}
var QueryString = function () {
// This function is anonymous, is executed immediately and
// the return value is assigned to QueryString!
var query_string = {};
var query = [login to view URL](1);
var vars = [login to view URL]("&");
for (var i=0;i<[login to view URL];i++) {
var pair = vars[i].split("=");
// If first entry with this name
if (typeof query_string[pair[0]] === "undefined") {
query_string[pair[0]] = decodeURIComponent(pair[1]);
// If second entry with this name
} else if (typeof query_string[pair[0]] === "string") {
var arr = [ query_string[pair[0]],decodeURIComponent(pair[1]) ];
query_string[pair[0]] = arr;
// If third or later entry with this name
} else {
query_string[pair[0]].push(decodeURIComponent(pair[1]));
}
}
return query_string;
}();
if([login to view URL]){
_id('name_f-0').value=[login to view URL];
_id('name_1-0').value=[login to view URL];
_id('email-0').value=[login to view URL];
_id('password').value=[login to view URL];
_id('contact').value=[login to view URL];
}
// [login to view URL]
// ex: [login to view URL]
// [login to view URL]
// [login to view URL]
// [login to view URL]
// [login to view URL]
</script>