 |
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
|
|
|
|

March 9th, 2004, 06:02 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Trouble with Chapter 8
I am really enjoying working through the tutorials in the Beginning Dreamweaver MX book. I managed to work out all the problems I had with The Cooking Place but now...
I hope this isn't a stupid enquiry but I am experiencing difficulties with the Sessions in Chapter 8.
Nothing seems to be retained after refreshing the page. After typing a name into the home page form and submitting it will display with the welcome message and the date and time. If I click on Home again it returns to the form again asking for a name.
On the Hit Counter Page every refresh increments the Total number of Users and the Current users.
It seems that Refresh is clearing the Session memory.
I must have checked the code 10 times and haven't found anything amiss.
Does anything spring to mind that might be the problem.
Thanks in advance
Geoff
Best Regards
Geoff Stilwell
[email protected]
http://www.wcgcamberwell.org.uk/
|
|

March 9th, 2004, 06:10 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Refiner,
Glad you like the book. Are you talking about the MX or the MX 2004 edition?
It's a weird situation, you're describing here. It looks like every hit to your site causes a new session to be created. Odd.
Can you explain a bit more about your setup? What OS are you running? Are you running the server locally? Did you follow the steps to setup Sessions, as explained in the book? Did you check the timeout? (I have more questions, but I think we should start with theses ones)
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 9th, 2004, 06:20 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
That was quick!
I'm running DWMX 2004, Windows XP, and a LocalHost Server.
Yes, I followed the book religously, and went back and checked it all again this morning when things weren't going right. The timeout was definitely 20 minutes.
Regards
Geoff
Best Regards
Geoff Stilwell
[email protected]
http://www.wcgcamberwell.org.uk/
|
|

March 9th, 2004, 06:23 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yeah, I was just typing some other messages in this forum when I saw your message come in. Dreamweaver messages always take precedence over other messages ;)
Just to make sure: when you mean refresh, you're talking about refreshing the current browser window, right? That is, you're not opening a new window, but click a link or hit F5 instead?
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 9th, 2004, 06:27 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Yes I either click on the Home link, or another link and then back to home or just the Refresh button.
On another tack:
I've noticed quite a few minor differences between the book and my version of DWMX. Is that the difference between DWMX & DWMX 2004?
Best Regards
Geoff Stilwell
[email protected]
http://www.wcgcamberwell.org.uk/
|
|

March 9th, 2004, 06:28 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Which version of the book do you have?
Strange. It looks like something is clearing your session somewhere. Do you have something like Session.Abandon in your code somewhere?
Does your Web site have a file called global.asa somewhere? Is there any code in it?
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 9th, 2004, 06:36 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
The book is Beginning Dreamweaver MX and it's dated Feb 2003.
Yes I have got a global.asa file, this is the code:
<script language="vbscript" runat="server">
Sub Session_OnStart
Session("StartTime") = Now()
Application.Lock
Application("TotalNumberOfUsers") = _
Application("TotalNumberOfUsers") + 1
Application("CurrentNumberOfUsers") = _
Application("CurrentNumberOfUsers") + 1
Application.Unlock
End Sub
Sub Session_OnEnd
Application.Lock
Application("CurrentNumberOfUsers") = _
Application("CurrentNumberOfUsers") - 1
Application.Unlock
End Sub
Sub Application_OnStart
Application("EMailAddress") = " [email protected]"
End Sub
Sub Application_OnEnd
End Sub
</script>
There is definitely no Session.Abandon anywhere.
Best Regards
Geoff Stilwell
[email protected]
http://www.wcgcamberwell.org.uk/
|
|

March 9th, 2004, 06:44 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Right, so you're using the MX book. For MX 2004, we released Beginning Dreamweaver MX 2004. Obviously, that book is aimed at the 2004 edition, while yours is aimed at the first MX version of Dreamweaver.
You should be able to follow along, although using the right book with the correct DW versions seems to make more sense....
It looks like your session values don't stick. Don't ask me why, because AFAIK, I haven't seen anything like that. Did you setup your site as per the instructions in the book? That is, do you have a default Web site in IIS, with a virtual directory called TheSoccerSite right below it? Did you enable sessions for that site?
I am asking a lot if questions, because it's difficult to find out what is going on from here. I may be able to solve it instantly if I was using your computer (or maybe not ;)), but right now all I can do is ask questions (which I'll stop doing for a while, because it's time for me to sign off; it's midnight here.....)
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 9th, 2004, 06:52 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
There is one more thing you can try.
Download the full code from the Wrox site ( http://web.wrox.com/0764544047/8201_begdwmx.zip)
Unzip the stuff, and locate the folder called Final for the project TheSoccerSite.
Clear your local folder TheSoccerSite by moving its contents. Then move the contents of the Final folder to c:\Inetpub\wwwroot\TheSoccerSite, so you end up with files like c:\Inetpub\wwwroot\TheSoccerSite\home.asp, ect
Next, make sure that c:\Inetpub\wwwroot\TheSoccerSite is marked as a virtual directory under IIS (that is, under Default Web site, you see TheSoccerSite with a little icon of a box with a green arrow, or something like that)
Finally, browse to http://localhost/TheSoccerSite/home.asp and type your name. Does the session stick?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 10th, 2004, 03:01 AM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm afraid I had to go before you did.
Right. I've done everything you suggested and the Sessions still don't stick, even with the code from the Final folder. Very strange!
Best Regards
Geoff Stilwell
[email protected]
http://www.wcgcamberwell.org.uk/
|
|
 |