Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

HTML variable using

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marshal
Posts: 67428
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
ri gwang
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 67428
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic