This content has been marked as final. Show 3 replies
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.
The following is incorrect
if (document.forms['lname'] != null)
You don't have a form named 'lname' thus the if will always fail.
if(document.forms.elements['lname'].value != '')
Also your using the Like evaluation in the sql query, but it will only ever match an equals.