Littlebobbydroptables
Littlebobbydroptables

Reputation: 3731

HTML: what is this variable in curly braces? I never saw it before

Can somebody tell what variable is this {traveler.iFare} ? As far as i know this is not PHP one, and in project where i found it there is no template engines used.

<td class="t-r">
    <span class="no-br p-l5">
        <strong>
            {traveler.iFare}
            {traveler.sCurrency}
        </strong>
    </span>
</td>

I want to call JavaScript function with 'iFare' as a parameter, but cant understand how

<script>
    document.write(window.functions.function(param));
</script>

Upvotes: 1

Views: 3763

Answers (2)

Irfan
Irfan

Reputation: 100

That's structured code templating.

Read This

It should give you an idea of how to use it in HTML

Upvotes: 3

Shiv Kumar Ganesh
Shiv Kumar Ganesh

Reputation: 3825

In order to the the value of the iFare. The simple script can do it very well

var iFare = traveler.iFare

and use it as you wish. This can be done because the {traveler.iFare} comes from a templating engine and after analysing this I can tell that the traveler.iFare is a simple JSON object which has a value iFare associated.

Upvotes: 1

Related Questions