Skip to content

Instantly share code, notes, and snippets.

@brunosan
Created May 18, 2012 19:32
Show Gist options
  • Save brunosan/2727214 to your computer and use it in GitHub Desktop.
Save brunosan/2727214 to your computer and use it in GitHub Desktop.
Construct URL
function construct_URL(row)
{
switch(row.group)
{
case 1:
var RESPONSES_URL = RESPONSES_GROUP1_URL;
var AUTOFILL = "&entry_6="+ (row.prefix|| " ")
+ "&entry_0="+row.firstName
+ "&entry_7="+row.lastName
+ "&entry_8="+(row.company || " ")
+ "&entry_9="+(row.title || " ")
+ "&entry_5="+row.token;
break;
default:
var RESPONSES_URL = RESPONSES_GROUP2_URL;
var AUTOFILL = "&entry_6="+row.prefix
+ "&entry_0="+row.firstName
+ "&entry_7="+row.lastName
+ "&entry_8="+row.company
+ "&entry_9="+row.title
+ "&entry_5="+row.token;
}
var url = RESPONSES_URL + AUTOFILL;
return url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment