Prev | Current Page 315 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Other techniques exist to
maintain the script tags in the head element and guarantee that the code is executed at the right time and
they always leverage on some onLoad event that is browser specific.
< html >
< head >
< title > External Libraries with Javascript < /title >
< style >
#mypanel {
display: block; font-family: Verdana; font-size: 0.8em; position: absolute;
width: 120px; height: 120px; border: 2px solid #999999; left: 180px;
}
< /style >
< /head >
< body >
(continued)
162
Part I: The Core Language
< input id=???buttonDrag??? type=???button??? value=???pause drag??? >
< input id=???buttonVisibilty??? type=???button??? value=???hide??? >
< div id=???mypanel??? > < /div >
< script type=???text/javascript??? src=???external.js??? > < /script >
< script type=???text/javascript??? src=???main.js??? > < /script >
< /body >
< /html >
As good practices require, the presentation layer and the logic layer are completely separated; one of the
advantages of this separation is that it is easier for both the designers and the programmers to deal just
with what they do best.


Pages:
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327