This topic is locked

Popup windows from event

10/22/2007 6:00:11 PM
ASPRunnerPro General questions
E
ebolisa author

Hi,

I'd like to launch a popup window when is an employee bday. I'm using the following code but it's not working. I know that the error is in the response.write line but just cannot see it.

Can someone review it pls.

TIA

Emilio

str = "select DOB, employee from dbo.employees WHERE (DATEPART(m, DOB) = DATEPART(m, GETDATE())) AND (DATEPART(d, DOB) = DATEPART(d, GETDATE()))"

Set rsTemp = server.CreateObject("ADODB.Recordset")

rsTemp.open str, dbConnection

if not rsTemp.eof then

Response.write "<script>alert('--- Hi, today is ') &rsTemp("employee") & (' bday ---')</script>"
Sergey Kornilov admin 10/23/2007

Emilio,
try the following:

Response.write "<script>alert('--- Hi, today is " &rsTemp("employee") & " bday ---')</script>"