This content has been marked as final. Show 4 replies
If you're guaranteed that var3 will always be the last var, then that should work. Seems very fragile to me, though. What if one day you change one of the links going to that page to include another variable? and the code you just wrote that assumes var3 is always the last variable is overlooked? now you're getting the 4th variable's value.
That whole method seems fragile. You can't have any periods or dashes in your variable values, or it breaks. What if you ever want a variable name with a dash in it?
Originally posted by: Kronin555
What if you ever want a variable name with a dash in it?
Something like this:
Invalid CFML construct found on line 16 at column 8.
Dan, I wasn't talking about a CF variable. I was talking about a variable in the form that jqcf is using.
If var1's name wasn't var1, but was, for sake of argument, "my-var", then the URL becomes:
Now all of a sudden you can't use "-" as a delimiter between your variable.value pairs.
I know CF doesn't support variable names with dashes. Doesn't mean you can't use them elsewhere. Your form field names can include dashes, URL variables can include dashes, etc.
If you do have a URL variable with a dash in it, you can access it as:
I was simply saying that putting variables in the URL the way jqcf is asking about seems very fragile to me. The dash in a variable name was just an example. The method he's using, his variable values can't have any dashes or periods in them either.
Is there a legitimate reason for NOT just going with the standard format of
And so on?