File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes HTML variable using Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "HTML variable using" Watch "HTML variable using" New topic
Author

HTML variable using

ri gwang
Greenhorn

Joined: Jul 15, 2012
Posts: 2
I am reading one html source code. but I have a difficulty on understanding this source code.
there is a part as follows:

<div class="item" style="display: none" title="{$detail.ID}" id="{$detail.ID}"></div>
<div class="cls"><span class="left name">{$detail.name|strhtml}</span></div>

I can't understand what type {$detail.ID}, {$detail.name|strhtml} is.
if anyone know, please help me.
thnkx.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

Are you sure that you copied those correctly? Are they really in the form {$whatever} rather than ${whatever}? If it's really the latter then please be more careful posting in the future. Please read AvoidRedHerrings.

Those have nothing at all to do with HTML. They are JSP EL (Expression Language) expressions. They are evaluated on the server by a Servlet/JSP container in order to add dynamic values to the HTML prior to it being sent to the browser.

How JSP works is described in this article.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ri gwang
Greenhorn

Joined: Jul 15, 2012
Posts: 2
I copied correctly. Obviously it is. In that source, a src path is {$tpl}/js/jquery.js and it is written as <script type="javascript" src="{$tpl}/js/jquery.js"></script>.
help me. thnkx your attention.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

If that's the syntax, then it's some other templating solution other than JSP. I have no way of knowing which. You'll need to ask whoever you got the files from.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: HTML variable using