Blog Quickstart Documentation Download
Translations of this page?:

No questions yet. Click Edit page above. Write down you question, an hopefully get an answer. ;-)


Are you using tables for layout?

Yes, and no. No, because you will not see any of them while viewing source of your web page. Your html is kept clean, same as with pure css layouts. Yes, because my JavaScript is generating them inside client browser while loading page. If you are using browser with some kind of DOM Inspector you can see them.

Tables have consistent, stable behavior across different browsers, can be nested inside one another indefinitely, and have all the functionality required by BraveLayout so I'm using them.

What about the people that have javascript disabled? Will they be able to see my content?

Yes. With Javscript disabled user will see all the content of your page ordered as in you html file. None of the content is generated by JavaScript. You may easily check how your page will look with javascript disabled by disabling it yourself. You may also provide some css styles to make it little easier on eyes. You may also provide them with message that this site looks better with Javascript turned on.

How many people have Javascript disabled?

http://www.w3schools.com/browsers/browsers_stats.asp Here is stated that as for January 2007 6% of users had Javascript disabled or used browsers that do not have Javscript. Also there seems that percentage of such users declines in time. Probably due increased browser security (firefox, opera, ie7) and wide adoption of ajax (often not degrading gracefully).

As the page with this statistics states: “The statistics above are extracted from W3Schools' log-files, but we are also monitoring other sources around the Internet to assure the quality of these figures” so that statistic might not be exactly appropriate because people visiting W3Schools may not be the same kind of people that will visit your page.

Discussion

Ryan, 2008/01/01 11:23:

Hi. Congratulations on a great product; thanks for creating it.

My question. In IE 7 and IE 6 (with Windows SP2), Internet Explorer throws an ugly warning message to users whenever it detects JavaScript; the message basically warns users that they are running “scripts” on the page, which they say are potentially dangerous. (Hmmh! Since approx 90%+ of websites run JavaScript, we wonder at Microsoft's wisdom here). Some noob users get scared, and turn off their JavaScript.

How does BraveLayout work around this? That is, if the user turns off JavaScript, what will happen to the page layout?

Thanks in advance for your answer.

brave1979, 2008/01/02 15:05:

Hi. Thank you.

Could you go to page: http://www.bravelayout.scarabeo.biz/examples/example0.html and make a screenshot of this message for me (please send it to brave1979@o2.pl)?

I have never seen message warning user about any javscript. I've seen messages warning about errors in js or js running too long. Maybe you have those warnings in mind? They should not show up if you don't make some bug in your layout definition which you can (and should) check before making your webpage publicly accesible.

digital.alterego, 2008/01/24 17:01:

hi,

thanks for your library, everything works like advertised so far :-)

only two questions left:

1. i can't get the following layout to work in firefox:

header left | center bottom

so that the center area is scrollable and has 100% of the available height. if i set the height of the center area to “100%” it gets way to large in firefox and cuts off its contents without scrollbar, in ie6 and ie7 everything works fine.

i've googled a lot, but i can't find a sane solution to set the height of a <div> to 100% of it's parent <td> element. any hint would be highly appreciated!

2. jQuery integration It seems like the jquery version is almost identical to the standalone version. wouldn't it be possible to cut out all of the selector stuff included in the lib?

digital.alterego, 2008/01/24 17:03:

the editor ate my nice formatting, i'll try to describe the problem for pt.1:

i have a header row, below there are two columns, a small left one and the big center one, should take all available space (it works till here). now i want to make the center panel scrollable, this is the part that i'm not able accomplish.

digital.alterego, 2008/01/25 17:39:

Regarding pt.1 ) After hours of struggling, I was able to get it working in Firefox too. I added/changed the following lines (assuming jQuery present, but only needed for browsercheck) beginning at line 168:

		var appendTo = td;
		if (!$.browser.msie && containers[i].scrollable) {
			var outerDiv = document.createElement("div");
			outerDiv.style.height = "100%";
			outerDiv.style.position = "relative";
			outerDiv.style.overflow = "auto";
			outerDiv.style.width = "100%";
			outerDiv.style.top = 0;				
			
			var innerDiv = document.createElement("div");
			innerDiv.style.position = "absolute";
			innerDiv.style.height = "auto";
			innerDiv.style.overflow = "hidden";
			innerDiv.className = "innerDiv";
			
			outerDiv.appendChild(innerDiv);
			td.appendChild(outerDiv);
			appendTo = innerDiv;
		}
		appendTo.appendChild(BraveLayout.makeNode(containers[i], node.place != undefined ? listToMove[listToMove.length-1].subs : listToMove, node.rows ? tr : td, td));		

Adding this two divs does the trick for Firefox.

Regarding pt.2) I saw, that's possible to delete the complete libs section in the file when jQuery is used, maybe this could be done in the version provided on this site.

digital.alterego, 2008/01/25 17:41:

forgot to mention, that i added a property “scrollable” to the layout construction part. div wrapping is only done for elements where scrollable is set to true.

Enter your comment (wiki syntax is allowed):
faq.txt · Last modified: 2008/01/28 17:12 by 217.113.228.38
www.chimeric.de Driven by DokuWiki Recent changes RSS feed redesign of arctic template by LimeLine