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 October 15th, 2005, 07:13 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with login page...

Hey there all. Imar I hope your holidays were good.

I have been creating a login page for a while now with Dreamweaver, ASP and Access. When loging in to my web page I get the following error message. Can anyone let me know where I have gone wrong?

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A string literal was expected, but no opening quote character was found. Error processing resource 'http://www.timber.c...


-------------------------^

Thanks to all.
 
Old October 15th, 2005, 12:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi malhyp,

Can you show us the relevant parts of your code? Are you using XML somewhere?

And are you using the Login page from the book or does this Login page have nothing to do with that?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old October 15th, 2005, 07:55 PM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey there, I am not making the soccer site in the book. i am making my own website using the info out of the book. THat I know of I am not using XML, well I have not entered any XML code. I have also searched the whole website for the '' code and dreamweaver can not find it anywere. Little confised here now. Do you want me to copy the html for the whole page?

Mal

 
Old October 15th, 2005, 07:58 PM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If it helps at all visit 'http://www.timber.com.au/login.asp' and login using 'cae' and then 'students'. You will see the error there.
 
Old October 16th, 2005, 03:40 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

This is a more generic error that occurs. The font face stuff you see is from the error page, not necessarily from your own source.

Can you post a trimmed down version of your Login.aspx page? That is, try to cut away as much as possible the unnecessary HTML etc?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old October 16th, 2005, 04:38 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar, this is the best I could do.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("username"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="html/search.asp"
MM_redirectLoginFailed="login.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_connTimber_STRING
MM_rsUser.Source = "SELECT UserName, Password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM tblUsers WHERE UserName='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & Replace(Request.Form("password"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
     Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization ).Value)
    Else
     Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And false Then
     MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Recordset</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/JavaScript">
<!--


function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function MM_validateForm() { //v4.0
var i,p,q,nm,test,num,min,max,errors='',args=MM_valida teForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
     if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
     } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
         min=test.substring(8,p); max=test.substring(p+1);
         if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}
//-->
</script>
<link href="html/css%20files/paragraph.css" rel="stylesheet" type="text/css" />
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#5D5D5D">
<tr>
    <td height="4%" colspan="2">
    
     <div align="right"></div>
    </td>
</tr>
<tr valign="bottom">
    <td height="14%" colspan="2" bgcolor="#000000">
     <div align="left"></div>
    </td>
</tr>
<tr>
    <td colspan="2"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#5D5D5D">
        <tr>
         <td width="20%" valign="top">&nbsp; </td>
         <td width="80%" bgcolor="#ECECD7"><div align="center">
            <table border="0" cellpadding="7" cellspacing="0">
             <tr>
                <td><h3>Login Page</h3></td>
                <td>&nbsp;</td>
             </tr>
             <tr>
                <td><p>To search the Network please type in your
                    <br />
                 Username and Password, then click the
                 Submit button.</p></td>
                <td rowspan="3"><table height="85%" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#FFFFFF">
                    <tr>
                     <td><p align="center">Todays Date and
                            Time is;</p>
                     </td>
                    </tr>
                    <tr>
                     <td bgcolor="#CCCCCC"><p align="center"><strong>
                         <script language="JavaScript" type="text/javascript">
<!-- hide from old browsers
var curDateTime = new Date()
document.write(curDateTime.toLocaleString())
//-->
                </script>
                        </strong><strong> </strong></p>
                     </td>
                    </tr>
                    <tr>
                     <td><p align="center">This website
                            was last updated on;</p>
                     </td>
                    </tr>
                    <tr>
                     <td><p align="center">
                         Sunday, October 16, 2005 10:59 AM
                        </p>
                     </td>
                    </tr>
                    <tr>
                     <td><p align="center">Currently there
                            are 3 users online</p>
                     </td>
                    </tr>
                    <tr>
                     <td><p align="center">Total of subscribed
                            users 154</p>
                     </td>
                    </tr>
                    <tr>
                     <td><p align="center">Total of registered
                            advertisers 2012</p>
                     </td>
                    </tr>
                </table>
                </td>
             </tr>
             <tr>
                <td><form action="<%=MM_LoginAction%>" method="POST" name="login" id="login" onsubmit="MM_validateForm('username2','','R','pass word','','R');return document.MM_returnValue">
                 <table border="0" align="left" cellpadding="4" cellspacing="0">
                    <tr>
                     <td><p><strong>Username:</strong></p>
                     </td>
                    </tr>
                    <tr>
                     <td><p>
                         <input name="username" type="text" id="username2" />
                        </p>
                     </td>
                    </tr>
                    <tr>
                     <td><p><strong>Password:</strong></p>
                     </td>
                    </tr>
                    <tr>
                     <td><p>
                         <input name="password" type="password" id="password" />
                        </p>
                     </td>
                    </tr>
                    <tr>
                     <td><p>
                         <input type="submit" name="Submit" value="Submit" />
                        </p>
                     </td>
                    </tr>
                 </table>
                </form></td>
                </tr>
             <tr>
                <td><p align="justify">Not a member yet, <a href="html/subscribe.htm">[u]Subscribe
                        Now!</u></a></p>
                 <p align="justify">Need Help? <u onclick="MM_openBrWindow('html/forgotPassword.htm','forgotPassword','width=245,he ight=200')">Retreive
                    your lost Username and Password.</u> </p></td>
                </tr>
             <tr>
                <td valign="bottom"><h4><strong>Quotation Request</strong></h4>
                 </td>
                <td>&nbsp;</td>
             </tr>
             <tr>
                <td valign="top"><p>Looking for a price or availability on timber. <a href="html/quotationRequest.htm" target="_parent">[u]Click
                 Here</u></a>.</p></td>
                <td>&nbsp;</td>
             </tr>
            </table>
            </div>
         </td>
        </tr>
     </table>
        <div align="center"></div>
    </td>
</tr>
<tr>
    <td height="4%" colspan="2" valign="middle" bgcolor="#606060">
     <div align="center">
        <p> Copyright &copy; 2004
            - 2005 TimberCorporation. All Rights Reserved. <a href="html/legal.htm">[u]Privacy
            Policy</u></a> <a href="html/sitemap.htm">[u]Site
            Map </u></a></p>
     </div>
    </td>
</tr>
</table>
</body>
</html>
 
Old October 16th, 2005, 04:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not really trimmed down, is it??? ;)

Anyway, look at the very first line:

<?xml version="1.0" encoding="iso-8859-1"?>

You're saying your document is XML which it normally might be. However, maybe you have an ASP error, so the document is no longer XML and the browser has a problem displaying it.

Drop the XML prolog and you should see a different ASP error.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old October 16th, 2005, 05:22 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar, it worked as soon as I changed it. I beleive that it is there because when creating a new ASP page I had the 'Make Document XHTML Complaint' ticked. Know now. Yes you were right. Had a few more error messages which I have cleaned up. Now I have come to this one.
-------------------------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xc90 Thread 0xb6c DBC 0x15c1ff4 Jet'.
/login.asp, line 15
-------------------------------------------------------------------

Line 15: MM_rsUser.ActiveConnection = MM_connTimber_STRING

I will get the ref book out and figure it out from here.

Thanks heapes for your help.
 
Old October 16th, 2005, 05:37 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 Mal,

An 80004005 error usually means a permissions error. Check this FAQ for possible solutions:

http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=263

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old October 16th, 2005, 06:36 AM
Authorized User
 
Join Date: Aug 2005
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey, thank for the link,
http://Imar.Spaanjaars.Com/QuickDocId.aspx?QUICKDOC=263

There were quite a few changes that I made. It still comes up with the same message. Im thinking that these changes need to be uploaded to the site my web hoster has. How should I do this. Maybe delete the database then re upload it or is there another way.

Thanks for the link. Found quite a few other interesting topics.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Login page problem mashour BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 November 18th, 2008 05:25 PM
problem in designing login page like orkut nirmalbarsainyan ASP.NET 1.x and 2.0 Application Design 1 April 19th, 2007 05:15 AM
Login page back to original page pablohoney Classic ASP Basics 1 October 3rd, 2006 07:09 PM
LOGIN PAGE (does not link to the next page) [email protected] Classic ASP Databases 7 April 5th, 2006 01:28 PM
Newbie Help. Login to unique login page per user Kainan Classic ASP Professional 10 May 3rd, 2005 07:47 AM





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