I have the following question.<BR>I have asp page for sign to secure home page. What I need to do create a function to check the expiration date of the password and when the password is need to be changed, i did create asp page with sql stored procedure to do that but i have the following question. in order to check if the password is need to be change you need to get the expiration date from the table, I have no problem with that. Now need to create vbscript function, so that function will be called it same time you login to the page and call the database get the expiration field subtract from the date of today and pass the result to javascript function, and if the condition meet prompt the user message inform him/her that they need to change the password if the click ok take them the change password screen.<BR>My problem that I am unable to create vbscript function so it can be called same time you login when you click login button after your supply your user Id and Password, if you can provide me with syntax of vbscript function take parrameter name "UserId" and pass it to &#062;&#062;&#062;&#062;&#062; <BR>Function expire(UserId)<BR>Set conn_Date = server.CreateObject("adodb.connection")<BR>conn_Da te.Open "driver=sql server;server=cwsAPP;database=Sale;user Id=admin;password=admin2;"<BR>&#039;strSQL_Date = "Select * from tab_saleWHERE User_id = &#039;" & UserId & " &#039;"<BR>set rs_Date =Server.CreateObject("ADODB.recordset")<BR>rs.Open (strSQL), conn_Date<BR>strResult= DateDiff("d", rs_Date("Exp_DATE),date())<BR>Return strResult<BR>End function<BR>Here I pass to javascript and I want to make sure I call javascript function as will same time<BR><BR>Response.Write strResult<BR><BR>Here the javascript function<BR>function Check_exp() { var ExpDate = "&#060;%= strResult%&#062;"<BR>if (ExpDate&#060;14)<BR> { if (confirm("Your Password will expire soon, Do you want to change?")) { document.location.href = "changepassword.asp" }<BR> }<BR><BR><BR>Than take the result and pass it to javascript function.<BR>so I need<BR>function with the code I attached take one parameter UserId<BR>return result number diference between two dates, pass it javascript function. all that must happened with the sign process.<BR>I need your help very urgent.<BR> <BR><BR>Thanks in advance<BR><BR>Tedy<BR>