Skip to main content

Posts

Showing posts with the label code of login page using java script

Asp code to call home page on logout button,reset password of user

Asp code to call home page on logout button Make script code this way Put this code in vb-script tag sub home() document.frm.submit() end sub //to call function on click event this way onclick="home()" Asp code to reset password of user If you want to reset password or change password of particular user and you can login page then you can get hint or help to set this code in your form. set con=server.CreateObject ("ADODB.CONNECTION") set rs=server.CreateObject ("ADODB.RECORDSET") con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database Path" Response.Clear () set rs = con.Execute ("select * from logtable where Username='" & Request.Form ("logid") & "' and pwd = '" & Request.Form ("oldpassword") & "'" ) if rs.RecordCount <=0 then Response.Write "invalid password" end if if Request.Form("che

JavaScript for login page

function validPwd() uname = frm.logid.value if uname = "" then msgbox "Enter Your Login ID" frm.logid.focus() else if not Isnumeric(uname) then msgbox "Enter Proper Value for Login ID" frm.logid.focus() else matcholdpwd() end if end if end function function matcholdpwd() oldpwd = frm.pawd.value if oldpwd = "" then msgbox "Please Enter YourPassword" frm.pawd.focus() else submitForm() end if end function function submitForm() frm.submit() end function function changepwd() window.location = "changepwd.asp" end function function ForgetPass() document.frm.action ="ForgetPass.asp" document.frm.method ="post" document.frm.submit() end function