Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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 March 9th, 2007, 06:15 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It seems to error on the call to resizeIt() in the onload event. I can't find a reference to that function, so that may explain the error.

If you look in the final HTML, you'll see the JavaScript I am talking about. Calls like MM_preloadImages to preload the images and so on.

One way to optimize a little is to move all the JavaScript functions to a separate file so they only need to be downloaded once. Search Google for "javascript external file" to get some ideas.

Other than that, I see a lot of HTML markup (e.g. a background attribute) that can be moved to external CSS files for easier (and faster) reuse across pages.

But again: if you don't want to do all of this then don't bother. It's not the most important thing in the world.... ;)

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old March 9th, 2007, 08:01 PM
Authorized User
 
Join Date: Mar 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dearmisskat
Default

Well, I guess I need the resize command only in the index page, and then all the other pages will be loaded in the correctly sized browser window, right?


 
Old March 10th, 2007, 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

Personally, I don't like sites that resize my browser window. If you have a large screen with a high resolution, you can easily have two windows side by side. Then all of a sudden, you, the developer, determine that your site should be displayed full screen on my monitor. Hmmmm....

Resizing the window on the first page should be enough. That gives your user a chance to re-resize the window to something they like. If you keep resizing it on every page, you frustrate them even more.... ;)

Your call to resizeIt may not be necessary as you already have "self.resizeTo" in your code.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Table: width setting for a cell Venki XSLT 2 July 14th, 2008 09:05 AM
How to force table cell to a certain width? TheMajor HTML Code Clinic 1 April 17th, 2007 01:57 PM
reading from a table cell? Atomsk Access VBA 2 September 28th, 2006 07:46 AM
Hyperlink in a cell table amc Dreamweaver (all versions) 33 August 5th, 2004 12:11 PM





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