Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2005, 05:18 PM
Registered User
 
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 10 Pg 338

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
 
Old April 19th, 2005, 01:09 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old April 27th, 2005, 03:23 PM
Registered User
 
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<%@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>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>GlobalSoccerEvents.com - Your Source fr Soccer Events Around the Globe</title>

<link href="../../../TheSoccerSite/styles/mainStyles.css" rel="stylesheet" type="text/css">
</head>

<body>
<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">&nbsp;</td>
    <td><table border="0" align="right" cellspacing="0" cellpadding="0">
  <tr>
    <td><a href="/home.asp" id="home">Home</a></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
    <td><a href="/events.asp" id="events">Events</a></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
    <td><a href="/mySite.asp" id="mysite">My Site</a></td>
    <td>&nbsp;&nbsp;</td>
    <td><a href="/login.asp" id="login">Login</a></td>
    <td>&nbsp;&nbsp;</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.fontWeigh t = 'Bold';
        document.getElementById(sPageName).style.fontSize = '14pt';
    }
</script><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h2>Login to GlobalSoccerEvents.com</h2></td>
  </tr>
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#000000">
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="8">
              <tr>
                <td>Please type your username and password, then click the Login button
                </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>
    </td>
  </tr>
  <tr>
    <td><div align="center"><br>
        <br>
        <br>
        <br>
        <br>
        </div></td>
  </tr>
</table>
</body>
</html>


 
Old April 27th, 2005, 03:30 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmm, nice code... ;)

I actually asked for this:
Quote:
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?
 
Old April 27th, 2005, 03:43 PM
Registered User
 
Join Date: Mar 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old April 27th, 2005, 03:50 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 4 Pg 117 Try It Out workib ASP.NET 3.5 Basics 1 April 7th, 2008 12:49 AM
Chapter 9, Try it out Page 338, C# tbroom BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 October 3rd, 2006 03:43 AM
error found Chapter 10 pg 439 dogfish227 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 April 8th, 2004 01:08 PM
Chapter 10 pg. 339 trouble Tachyon BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 March 12th, 2004 03:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.