Bill,

I appreciate all and follow most of what you have said.
I changed the .css display to block as you suggested and the book example
worked just as well. But when I added the <form...> element from the jhs
html to the index.html, again the text is invisible. You probably knew
that, but I wanted to make sure you know I know that, too.

So, as you say the JHS framework for creating a dynamic webpage can have
problems with libraries out there. It seems to also have trouble with text
in that location, and I was looking for a workaround for that. Joe Bogner
has presented an alternative example with minimal use of the jhs framework,
and that may be a better way to go.

But using your substitution of block for none, but in the noun formtmpl_jhs_
I got the same desired result. So another possibility would be to
change formtmpl_jhs_
for my app. I don't know if that would be a good thing for more general
apps, though.

As Paul Jackson recommended, somewhat echoing your advice, I need to learn
more about html5 and especially about using the browser developer kits. But
I have been working with html on my own for several years, and feel I would
like to continue to work in the JHS environment, for now.

Thanks, so much, for your help with this. It really does help me.



On Wed, Feb 5, 2014 at 10:52 AM, bill lam <[email protected]> wrote:

> Brian,
>
> I downloaded the source code and the ch02/index.html ran fine on
> Chrome.  WebGL does not work for my display driver but that is
> another issue.  I guess the problem is not in DOM but that
> scripts not executed because both JHS and that webpage want to
> set the handler for onload event.
>
> Note that if I comment out the scripts by changing "script" to
> "noscript" in line 9 and 10, then the index.html will not display
> text. The reason may be that in line 20 of main.css it set
> display to none.  If you change that "none" to "block", then text
> will re-appear.
>
> Alternatively, if you also comment out line 7 and 8, change
> stylesheet to nostylesheet, text will also appear but without
> those fancy fnot.
>
> IMO, given that JHS is a framework for generating dynamic
> webpage, it can have problem with some javascript library out
> there.  If you want to learn from that book, then you need to
> put JHS aside.  When you have learnt enough HTML5 and javascript,
> you can write webpage using HTML5/javascript that communicate
> with a J server for computation.
>
> index.html
>
>   1 <!DOCTYPE HTML>
>   2 <html lang="en-US">
>   3 <head>
>   4     <meta charset="UTF-8">
>   5     <title>Jewel Warrior</title>
>   6
>   7     <link rel="stylesheet" href="styles/main.css" />
>   8     <link rel="stylesheet" href="styles/fontfaces.css" />
>   9     <noscript src="scripts/modernizr.js"></noscript>
>  10     <noscript src="scripts/loader.js"></noscript>
>  11 </head>
>  12 <body>
>  13     <div id="game">
>  14         <div class="screen" id="splash-screen">
>  15             <h1 class="logo">Jewel <br/>Warrior</h1>
>  16             <span class="continue">Click to continue</span>
>  17         </div>
>  18
>  19         <div class="screen" id="main-menu"></div>
>  20         <div class="screen" id="game-screen"></div>
>  21         <div class="screen" id="high-scores"></div>
>  22     </div>
>  23 </body>
>  24 </html>
>
> main.css
>
>  16 #game .screen {
>  17     position : absolute;
>  18     width : 100%;
>  19     height : 100%;
>  20     display : none;
>  21     z-index : 10;
>  22 }
>  23
>
>
> --
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to