Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2006, 03:41 PM
MM MM is offline
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with master page rendering in ch02

Hi folks sorry to be such a bore...
but I entered all the html for the master page on pages 30-32 (since in any case the master page in the download code is full of web part stuff)

I added in the css from the final download

everything is great, except I have no footer and no footer banner
After really elaborate checking for ages I cannot find the problem.

has anyone else had this problem or if anyone has got the footer stuff working but has not got to web parts yet, I wonder if you would so kindly post up your html for the master page so that I can compare it to mine.

Regards
MM
  #2 (permalink)  
Old November 14th, 2006, 09:23 AM
MM MM is offline
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I worked it out!
in the style sheet that I pasted in from the code downlaod the visibility attribute for the #footer id is set to 'hidden'
it should be set to 'visible'
I've no idea why it's hidden or why it works in Marco's full version, but resetting it to visible made my footer show up

  #3 (permalink)  
Old November 16th, 2006, 07:17 PM
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Good that you solved it but we really like to know why it works in Marco's full version. I will start coding with the book soon so I guess I will visit the forums all the time

  #4 (permalink)  
Old November 18th, 2006, 06:10 AM
MM MM is offline
Registered User
 
Join Date: Nov 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yep (why does it work in Marco's full version), that is a strange one if I find out I'll post it up here
  #5 (permalink)  
Old December 5th, 2006, 06:10 AM
Registered User
 
Join Date: Dec 2006
Location: , CA, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same problem and spent ages going over the code like you did.

I did find the reason why it works on Marco's version.
It's the block of javascript he inserted at the top of the Template.master file.

Quote:
quote:
Code:
    <script type="text/javascript">
    /* <![CDATA[ */ 
        function AdjustColumnsHeight()
        {
            // get a reference to the three DIVS that make up the columns
            var centerCol = window.document.getElementById('centercol');
            var leftCol = window.document.getElementById('leftcol');
            var rightCol = window.document.getElementById('rightcol');
            // calculate the max height
            var hCenterCol = centerCol.offsetHeight;
            var hLeftCol = leftCol.offsetHeight;
            var hRightCol = rightCol.offsetHeight;
            var maxHeight = Math.max(hCenterCol, Math.max(hLeftCol, hRightCol));
            // set the height of all 3 DIVS to the max height
            centerCol.style.height = maxHeight + 'px';
            leftCol.style.height = maxHeight + 'px';
            rightCol.style.height = maxHeight + 'px';            
            // Show the footer
            window.document.getElementById('footer').style.visibility = 'inherit';
        }
        window.onload = function() { AdjustColumnsHeight(); }   
    /* ]]> */       
    </script>
Actually, it's just this line that's revealing the footer:
Code:
window.document.getElementById('footer').style.visibility = 'inherit';
I did a couple quick checks, and it seems that you need the AdjustColumnsHeight() function in order for the footer to be placed properly at the bottom of the page without overlap from the columns.

However, there doesn't seem to be any reason to "reveal" the footer with that code; it works just fine for me if I set the footer to "visible" on the style sheet and comment-out the above line in the Template.master javascript that changes the visibility. Seems to me like it should probably have just been left set to "visible" on the style sheet to avoid confusion.

He should have also included that javascript in Ch 2 to save folks the frustration of figuring out why their page doesn't look like the picture at the end of the chapter, and has no footer.

Btw, does anyone know what the commented-out lines at the top and bottom of the script are there for?

  #6 (permalink)  
Old December 5th, 2006, 08:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:does anyone know what the commented-out lines at the top and bottom of the script are there for?
This is possibly a bad guess, but it almost looks like a block comment designed to hide the script from a browser that has JavaScript disabled. We used to see the older style HTML comments doing this kind of thing, but this seems to have a similar purpose, but aimed at XHTML compliance?

http://www.w3.org/TR/2000/REC-xml-20...sec-cdata-sect

By the way, I love your analysis of the footer! It sounds correct to me. You should consider adding this as an errata item at the Wrox site.

Eric


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Control not rendering in Master Page skmcusp ASP.NET 2.0 Basics 2 September 10th, 2007 04:58 PM
Session Not available Problem in Master Page cbe_seenu ASP.NET 2.0 Professional 0 July 31st, 2006 08:47 AM
Problem with CH02 datacontrol.aspx Nikon BOOK: Beginning ASP.NET 1.0 1 October 25th, 2004 02:13 AM
Viewer Not Rendering Page pvasudevan Crystal Reports 1 September 14th, 2004 06:36 AM
Ch02 control.aspx different problem gwheeldon BOOK: Beginning ASP.NET 1.0 1 October 22nd, 2003 11:51 AM



All times are GMT -4. The time now is 07:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.