I am currently dealing with a .NET login page that functions perfectly in Internet Explorer 7. However, my goal is to enhance its compatibility with Chrome, Mozilla, and Safari.
The login code behind looks like this:
Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click
{..................
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "test", "login()", True)
........}
Here is the ASPX page code snippet:
function login()
{
if(document.getElementById("ctl00_Sidebar_Contentplaceholder_Lo1_SaveFlag").value =="Y")
{
window.open("Home.aspx?PlotRef=" + document.all("ctl00_Sidebar_Contentplaceholder_Lo1_SaveFlag").value + "&print=print","",'location=no,fullscreen=no,menubar=no,titlebar=yes,status=yes,toolbar=no,scrollbars=yes,resizable=yes');
if(document.getElementById("ctl00_Sidebar_Contentplaceholder_Lo1_hidChangePass").value =="Y")
{
window.open("ChangePass.aspx","ChangePassword","top=50,left=50,height=310,width=725,location=no,menubar=no,status=yes,addressbar=no,toolbar=no,scrollbars=no,fullscreen=no,resizable=no")
}
window.open('','_self','');
window.close();
}
}
Unfortunately, the current setup is not functioning as expected. Despite my attempts at debugging, I have only been able to step through the code behind in debug mode and unable to access the javascript function login()
on the ASPX page.