|
Giomanach -> RE: can javascript be in tableless page... (3/26/2005 20:02:33)
|
Grizz In answer to the initial question - Yes you can use JavaScript on a tableless page. JS can be applied to any web page, as long as it is done correctly and effectively. You can't just throw it in "as is" and expect it to work. The simple reason being most JS scripts these days are written for IE. To the pages: 4a.htm IMO you have far too many DIVs on the page which will, in the end, cause you no end of problems. This page also does not validate in either HTML or CSS - I would sort those before looking any further into the coding of it. At the bottom of this page you have a Valid CSS button that's not relevant to the page? You should really remove that and not replace it until the page does validate. You have a grand total of 61 DIVs and a serious case of ID syndrome and Classitis, I'm not really sure you need all of those IDs and classes applying, you could also cut down on the number of DIVs used. There is also no need for the spacer DIVs that you have, they can be replaced with additional padding/margins. If you cut down on the number of DIVs and reduce the number of Classes & IDs on this page, you should see an improvement on the layout, and parsing time. With the news ticker/JS marquee; they never have been designed to work well with Gecko browsers, and you have two main flaws with your coding on these. You are defining an exact JS language for the Gecko engine to parse, this causes no end of problems. You also have not declared what type of coding/script it is. The language attribute is for the older browsers to parse the JS without a hitch and should always be filled with the content of JavaScript - you don't need the 1.2 or whatever version number. You also need to apply type="text/javascript" for the newer browsers (especially FF, MZ, OP, NN) to parse it, otherwise, it will either be ignored or parsed incorrectly, which is happening to you right now. 44.htm This page doesn't even have a DTD. You are using XHTML, and you haven't closed off all the tags - this will cause a parsing problem with XHTML, and needs to be corrected. The CSS on this page does not validate at all due to the non-valid XHTML coding. You can view the validation pages via the w3c validators. This is the page with the iFrame, and it fails the validation process with flying colours. No DTD, no character set, no type attribute on the JS, no quotes round the border/background color, therefore rendering it as black. No title element on this page. The list goes on with just the iFrame, and that will also fail the validation. Also I would love to know where you managed to learn JavaScript1.3? If you want it to really work, try applying the method you used in the iFrame to 4a.htm - it might just work then. JS, CSS & HTML will all work in harmony if used correctly, and effectively. The changes in browser are usually due to messy coding, too much coding, bad coding, or just plain ignorance from the web editor. Here I am only offering advice on what to do, and how I would code the page. And as a request, can you please type in normal English and spell correctly. Ex-plorer is a nonexistent program, it is spelled as Explorer, i-frames is iFrames and Advanze is advance. Dan
|
|
|
|