|
Subject:
|
Chapter 10 Pg 338
|
|
Posted By:
|
Loretta
|
Post Date:
|
4/18/2005 5:18:39 PM
|
I have added the Username and Password info to the form. I tried it out in Internet Explorer and it seemed to work fine from localhost.
I then tried it in Opera and it showed all the ASP code in the header of the form.
Will this work with all browers or is it just acting strangely because I am in a test environment?
Thanks
|
|
Reply By:
|
Imar
|
Reply Date:
|
4/19/2005 1:09:31 AM
|
Hi Loretta,
The example is supposed to work in all browsers, so something else must be going wrong.
How does the address in your address bar of your browser (both IE and Opera) look like? Can you post that here?
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me.
|
|
Reply By:
|
Loretta
|
Reply Date:
|
4/27/2005 3:23:34 PM
|
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <% Dim sErrorMessage If Request.Form("txtUserName") <> "" And _ Request.Form("txtPassword") <> "" Then If Request.Form("txtUserName") = "UserName" And _ Request.Form("txtPassword") = "Password" Then Session("MM_Username") = Request.Form("txtUserName") Response.Redirect("admin/admin.asp") Else sErrorMessage = "<br>" & "Login failed. Please type a valid username and password" End If End If %> <html><!-- InstanceBegin template="../../../TheSoccerSite/Templates/mainTemplate.dwt.asp" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- InstanceBeginEditable name="doctitle" --> <title>GlobalSoccerEvents.com - Your Source fr Soccer Events Around the Globe</title> <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --> <link href="../../../TheSoccerSite/styles/mainStyles.css" rel="stylesheet" type="text/css"> </head>
<body><!-- #BeginLibraryItem "/Library/mainMenu.lbi" --> <style type="text/css"> <!-- td { font-family: Arial, Helvetica, sans-serif; color: #000000; } a { font-family: Arial, Helvetica, sans-serif; color: #669933; } --> </style> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="../../../TheSoccerSite/Images/logo.gif"> </td> <td><table border="0" align="right" cellspacing="0" cellpadding="0"> <tr> <td><a href="/home.asp" id="home">Home</a></td> <td> </td> <td><a href="/events.asp" id="events">Events</a></td> <td> </td> <td><a href="/mySite.asp" id="mysite">My Site</a></td> <td> </td> <td><a href="/login.asp" id="login">Login</a></td> <td> </td> </tr> </table> </td> </tr> </table> <br> <script language="JavaScript" type="text/javascript"> var sPageName = '<%=Request.ServerVariables("SCRIPT_NAME")%>'; sPageName = sPageName.substr(sPageName.lastIndexOf('/') + 1 ).toLowerCase(); sPageName = sPageName.substr(0, sPageName.lastIndexOf('.')); if (document.getElementById(sPageName)) { document.getElementById(sPageName).style.fontWeight = 'Bold'; document.getElementById(sPageName).style.fontSize = '14pt'; } </script><!-- #EndLibraryItem --><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><h2><!-- InstanceBeginEditable name="Title" -->Login to GlobalSoccerEvents.com<!-- InstanceEndEditable --></h2></td> </tr> <tr> <td><!-- InstanceBeginEditable name="Content" --> <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#000000"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="8"> <tr> <td><font color="#CCCCCC">Please type your username and password, then click the Login button </font></td> </tr> <tr> <td width="100%" bgcolor="#CCCCCC" colspan="2"> <form name="frmLogin" method="post" action="login.asp"> <p>Username<br> <input name="txtUserName" type="text" id="txtUserName"> </p> <p>Password<br> <input name="txtPassword" type="password" id="txtPassword"> </p> <p> <input name="btnLogin" type="submit" id="btnLogin" value="Login"> </p></form> </tr> </table></td> </tr> </table> <!-- InstanceEndEditable --></td> </tr> <tr> <td><div align="center"><br> <br> <br> <br> <br> <!-- InstanceBeginEditable name="Footer" --><!-- InstanceEndEditable --></div></td> </tr> </table> </body> <!-- InstanceEnd --></html>
|
|
Reply By:
|
Imar
|
Reply Date:
|
4/27/2005 3:30:21 PM
|
Hmmm, nice code... ;-)
I actually asked for this:quote: How does the address in your address bar of your browser (both IE and Opera) look like? Can you post that here?
Do you browse to the page using an address like http://localhost/SomePage.asp??
Oh, P.S.: The page looks fine in FireFox, Opera and IE on my test system.
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. While typing this post, I was listening to: Vamos by Pixies (Track 16 from the album: Surfer Rosa & Come On Pilgrim) What's This?
|
|
Reply By:
|
Loretta
|
Reply Date:
|
4/27/2005 3:43:57 PM
|
Sorry, I posted the code because I can't reproduce the problem. Internet Explorer won't pull anything up it just doesn't open IE at all.
Opera opens at:
file://localhost/C:/Inetpub/wwwroot/TheSoccerSite/newlogin.asp
I restarted IIS and redid the page, so I'm sure it has something to do with my code.
Thanks
|
|
Reply By:
|
Imar
|
Reply Date:
|
4/27/2005 3:50:57 PM
|
Ah, that explains a lot. This sounds like a configuration error in your Dreamweaver Website setup. You shouldn't open the file using file:// but as http://localhost.
If you set up your site correctly (refer to the first chapter of the second section, TheSoccerSite) then you should be able to press F12 to open the page in your (default) browser. The page is supposed to open as http://localhost/TheSoccerSite/Login.asp.
Cheers,
Imar --------------------------------------- Imar Spaanjaars Everyone is unique, except for me. While typing this post, I was listening to: Wave Of Mutilation by Pixies (Track 3 from the album: Doolittle) What's This?
|