Created
May 18, 2012 19:32
-
-
Save brunosan/2727214 to your computer and use it in GitHub Desktop.
Construct URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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