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 19th, 2004, 07:38 PM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default No table in browser but category list menu shown

Hi, i have reached page 434 point 3 in Beginning Dreamweaver mx 2004 and have run into a problem. not ma day today...basically i choose from the list of events (champ leahue, uefa etc) in events.asp in my browser and the table is invisible,,,not there, when i select the events the address changes showing the category but nothing happens eg ...http://localhost/TheSoccerSite/events.asp?lstCategory=2

Also when i test the list in Server Beahviour recordset dilogue box it works and the right results are shown. please help..been following the book word for word. sometimes i get 404 page error....but when i seem to reset the computer and start fresh i usally get the first problem....also although this is not a big problem but the menu items in the browser do not ligh up in bold when i switch pages no more. they just stay the same....Thanks for any replies..Appreciated...

 
Old April 20th, 2004, 02:03 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 Joshil,

Can you post the code for both problems? Since the Dreamweaver code is quite large, you may decide to skip some irrelevant parts of it. If you can't decide what to leave out, post it all.

To make things easier, maybe you can start a separate thread for the Menu problem. This way we can work on both problems without messing things up too much.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Interlude by Muse (Track 7 from the album: Absolution)

 
Old April 20th, 2004, 08:05 AM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Imar
 Hi Joshil,

Can you post the code for both problems? Since the Dreamweaver code is quite large, you may decide to skip some irrelevant parts of it. If you can't decide what to leave out, post it all.

To make things easier, maybe you can start a separate thread for the Menu problem. This way we can work on both problems without messing things up too much.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Interlude by Muse (Track 7 from the album: Absolution)

i think my testing server is not working. when i used the live data view option (chap 12 pg 446 point10) i got a 404 error suggesting the error maybe due to "C:/Inetpub/wwwroot/TheSoccerSite/" folder did not match "http://localhost/thesoccersite/" URL on the testing server. is suggests i verify URL prefix maps root of site. however my details regarding the server infor match the book word for word. i am confused. i have windows xp prof, iis and IE. obviously dynamic pages are not vbeing processed by the server. the server behaviours were copied and pasted from the Wrox code, because at first the arrow on the panel was forzen becase there was no tick beside the "set up sites testing server". however i thought if i copied the code it may work. however in the recordsets dialogue box the right results for the queries are made and therefore there is obviously a connection with the database however in the browser the results are not shown. the table is sometimes shown but the when the categories are selected there is not change, when there should be as the different categories represent different events.


i also noticed in windows explorer under the root of the soccer site the in the database folder there is the main database but there is aslo another file called TheSoccerSite.ldb but the type of file is Microsoft Access Record-Locking Information file. Should this be there? its not mentioned in the book...in dreamweaver the file is not in my local view but is in the remote and testing server view...very confusing..

the events.asp code in full is pasted below,

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
Dim rsEvents__MMColParam
rsEvents__MMColParam = "1"
If (Request.QueryString("1stCategory") <> "") Then
rsEvents__MMColParam = Request.QueryString("1stCategory")
End If
%>
<%
Dim rsEvents
Dim rsEvents_numRows

Set rsEvents = Server.CreateObject("ADODB.Recordset")
rsEvents.ActiveConnection = MM_connTheSoccerSite_STRING
rsEvents.Source = "SELECT EndDate, ID, StartDate, Summary, Title FROM Events WHERE Category = " + Replace(rsEvents__MMColParam, "'", "''") + " ORDER BY StartDate ASC"
rsEvents.CursorType = 0
rsEvents.CursorLocation = 2
rsEvents.LockType = 1
rsEvents.Open()

rsEvents_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
rsEvents_numRows = rsEvents_numRows + Repeat1__numRows
%>

<% SetFirstVisitedPage() %>
<%
Dim iLastCategory
If Request.QueryString("lstCategory") <> "" Then
    ' Category has been chosen, so let's save it in a cookie
    iLastCategory = Request.QueryString("lstCategory")
    Response.Cookies("LastCategory") = iLastCategory
    Response.Cookies("LastCategory").Expires = Date() + 10
    Else
    ' Page is requested directly, so get the cookie
    If Len(Request.Cookies("LastCategory")) > 0 Then
     iLastCategory = CInt(Request.Cookies("LastCategory"))
    End If
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
function DoDateTime(str, nNamedFormat, nLCID)
    dim strRet
    dim nOldLCID

    strRet = str
    If (nLCID > -1) Then
        oldLCID = Session.LCID
    End If

    On Error Resume Next

    If (nLCID > -1) Then
        Session.LCID = nLCID
    End If

    If ((nLCID < 0) Or (Session.LCID = nLCID)) Then
        strRet = FormatDateTime(str, nNamedFormat)
    End If

    If (nLCID > -1) Then
        Session.LCID = oldLCID
    End If

    DoDateTime = strRet
End Function
</SCRIPT>
<html>
<head>

<title>GlobalSoocerEvents.com - Your source for up to date soccer events</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<%
            Dim sBackgroundColor
            If Len(Request.Cookies("BackgroundColor")) > 0 Then
                sBackgroundColor = Request.Cookies("BackgroundColor")
            Else
                sBackgroundColor = "#ffffff" ' Our default background color
            End If
            Dim iTheme
            If Len(Request.Cookies("SiteTheme")) > 0 Then
                iTheme = Request.Cookies("SiteTheme")
            Else
                iTheme = 1 ' Our default theme
            End If
%>
<link href="Styles/mainStyles.css" rel="stylesheet" type="text/css">
<link href="Styles/mainStyles<%=iTheme%>.css" rel="stylesheet" type="text/css">
</head>

<body style="background-color: <%=sBackgroundColor%>"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td><img src="Images/Blue%20hills.jpg" width="257" height="58"></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>
    <%
MM_authorizedUsers="Administrators,Members"
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuth orization"))>=1) Then
    %>
    <td><a href="mySite.asp" id="mysite">My Site</a></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
     <%
     End If
End If
%>
<%
MM_authorizedUsers="Administrators"
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuth orization"))>=1) Then
    %>
    <td><a href="Admin/admin..asp" id="admin">Admin</a></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
    <%
End If
End If
%>
    <td><a href="login.asp" id="login">Login</a></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>Current Events</h2></td>
</tr>
<tr>
    <td> <form action="events.asp" method="get" name="frmSelectCategory">
                <select name="lstCategory" onChange="document.frmSelectCategory.submit();">
             <option value="">Select a Category</option>
                    <% If iLastCategory = 1 Then sSelected = " selected=""selected""" _
                             Else sSelected = ""%>
                         <option value="1"<%=sSelected%>>Champions League</option>
                    <% If iLastCategory = 2 Then sSelected = " selected=""selected""" _
                             Else sSelected = ""%>
                         <option value="2"<%=sSelected%>>UEFA Cup</option>
                    <% If iLastCategory = 3 Then sSelected = " selected=""selected""" _
                             Else sSelected = ""%>
                         <option value="3"<%=sSelected%>>National League</option>
                    <% If iLastCategory = 4 Then sSelected = " selected=""selected""" _
                             Else sSelected = ""%>
                         <option value="4"<%=sSelected%>>US Major League Soccer</option>
                </select>
            <table width="600" border="1" cellspacing="2" cellpadding="2" class="clsSolidBlackBorder">
             <%
While ((Repeat1__numRows <> 0) AND (NOT rsEvents.EOF))
%>
             <tr>
                <td class="clsHeading"><%=(rsEvents.Fields.Item("Title ").Value)%></td>
             </tr>
             <tr>
                <td class="clsSummary"><%=(rsEvents.Fields.Item("Summa ry").Value)%></td>
             </tr>
             <tr>
                <td>This Event will last from <%= DoDateTime((rsEvents.Fields.Item("StartDate").Valu e), 1, 1033) %> until <%= DoDateTime((rsEvents.Fields.Item("EndDate").Value) , 1, 1033) %></td>
             </tr>
             <tr>
                <td></td>
             </tr>
             <%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsEvents.MoveNext()
Wend
%>

        </table>
</form>
    </td>
</tr>
<tr>
    <td align="center"><div align="center"><br>
        <br>
        <br>
        <br>
        <br>
        </div></td>
</tr>
</table>
</body>
</html>
<%
rsEvents.Close()
Set rsEvents = Nothing
%>


the second problem is the menu item does not enlarge and bold when selected...the code is below for mainMenu.lbi

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td><img src="../Images/Blue%20hills.jpg" width="257" height="58"></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>
    <%
MM_authorizedUsers="Administrators,Members"
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuth orization"))>=1) Then
    %>
    <td><a href="../mySite.asp" id="mysite">My Site</a></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
     <%
     End If
End If
%>
<%
MM_authorizedUsers="Administrators"
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuth orization"))>=1) Then
    %>
    <td><a href="../Admin/admin..asp" id="admin">Admin</a></td>
    <td>&nbsp;&nbsp;&nbsp;</td>
    <%
End If
End If
%>
    <td><a href="../login.asp" id="login">Login</a></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>

Thanks for your help Imar.
 
Old April 21st, 2004, 04:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmmm, this is strange. I am 100% sure I answered this post yesterday.
Anyway, the problem was very hard to spot at first, but easy to fix afterwards. Take a look at this:
Code:
Dim rsEvents__MMColParam
rsEvents__MMColParam = "1"
If (Request.QueryString("1stCategory") <> "") Then 
  rsEvents__MMColParam = Request.QueryString("1stCategory")
End If
Do you see the problem? Neither do I, but if you look at the code in Notepad or another fixed font editor, you'll see that you are checking the querystring 1stCategory and not lstCategory (that is, you're using "first" Category, and not "list" Category.

Change both occurrences of 1stCategory to lstCategory and the page should work.

Sorry for the delay. Somehow this post got lost or never got posted....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Kool Thing by Sonic Youth (Track 4 from the album: Goo)

 
Old April 21st, 2004, 06:56 PM
Authorized User
 
Join Date: Apr 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for that Imar, i changed the occurences of 1stCategory to list. infact i downloaded the code for the whole page and pasted it into my file..still got the same problem. It cant be the code because its the code provided for the book. i think i know the root of the problem. When introduced to server behaviours for the first time in the book, i could not use the drop down arrow in the server behaviours panel or bindings as it was forzen. this was because i did not have a tick by the "set up sites testing server". however i inserted the worx download code and then the drop down arrow was alive. However it hasent solved the problem of sorting the sites testing server, and this is why i think dynamic pages are not being processed. also in chap 13 pg 469 where dynamic tables are introduced i get an set up instructions message where there was a tick for create site for the file and document type but not for testing server. However i have setup the sites local remote and testing server exactly to the book. Windows XP PROF, IIS and Internet Explorer. What should i do???i have checked a zillion times the setup of the site and it matches the book word for word. Also (chap 12 pg 446 point10) i got a 404 error suggesting the error maybe due to "C:/Inetpub/wwwroot/TheSoccerSite/" folder did not match "http://localhost/thesoccersite/" URL on the testing server. is suggests i verify URL prefix maps root of site. Or that maybe the serving is not executing .asp extention files. I dont know what to do.. when i test the recordset (query) in the recordset dioulogue box the right results are shown..but dreamweaver keeps asking me to set up the sites testing server...very confused...appreciate ur time and help ,,thank you,,,.
 
Old April 22nd, 2004, 02:41 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmmm, weird weird weird.

A few things I can think of:

1. Did you change the folder C:\Inetpub\wwwroot\TheSoccerSite into a Virtual Directory, as instructed in the book on page 261 and 262?

2. Do you have the folders C:\TheSoccerSite and C:\inetpub\wwwroot\TheSoccerSite? Is the first your local folder and the second your remote and testing folder?

3. When you look at the source of the page in the browser, what do you see? Any output, or do you still see the code between <% and %>??
Also, do you see an error message? If an error occurs within an HTML table, the error is not always visible in Internet Explorer, but it *is* visible in the source.....

If this doesn't help, can you upload screen shots (Alt + Print Screen)of the three categories of the Site Definition dialog somewhere? If you can't upload them somewhere, can you send them to my e-mail address? Please compress them and/or save them as jpg to minimize the size......

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Special Cases by Massive Attack (Track 4 from the album: 100th Window)






Similar Threads
Thread Thread Starter Forum Replies Last Post
create a custom list to store the category code kiwibey SharePoint Development 0 April 3rd, 2008 02:04 AM
List Menu Height creative_eye CSS Cascading Style Sheets 0 February 28th, 2008 06:50 AM
SetDataSource is ignored, the whole table is shown anjulis Crystal Reports 0 October 20th, 2006 12:26 PM
Dataview from Menu list? Shadane SharePoint Development 0 October 11th, 2006 03:04 AM
Populating master table with list from list table sburgess Access 7 September 1st, 2006 06:03 AM





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