What URL value are you trying to extract? It seems as if you
are passing the value of a form field to a popup window via URL
variables. Is that right, or did I miss something? What happens
when you alert() the value of your lname form field before you send
the data? Are you addressing the form field correctly? What about
when you perform a <cfdump> of the URL variables on your
page2.cfm? Is your "URL.lname" variable passing correctly?
Also, once you figure out how to pass your variable, I would
recommend using <cfqueryparam> with your EmployeeDirectory
query. It might speed things up a little and help protect you
against XSS and SQL injection.