using template variable for generating id

1 posts, 0 answers
  1. Muhammed Shakir
    Muhammed Shakir avatar
    11 posts
    Member since:
    Jan 2012

    Posted 05 May 2012 Link to this post

    Hi ,

    I have a function to call in a listView which is generated using a template. The function takes id of the div and does something to it. The cannot be same of all div(s) generated in the listView or else the function logic will for a toss. I tried generating the id of div like this :

    <div id="menuitemtarget#= eventId #" ..... 
    But to my dismay, the id does not take in menuitemtarget101 (if eventId is 101) it takes it as id="menuitemtarget#= eventId #" as it is.

    My Code is somewhat like this :

    <div id="menuitemtarget" class="searchcell"

    onclick="# tntToggleMenu("#menuitemtarget", "#menuActions") #>

    <span>Actions</span> <span class="iconaero"> <!-- -->


    <div class="clear"></div>

    <ul class="actionsMenu displayNone" style="margin: 0;"


    <li class="actionMenuItem"><a href="">Option 1</a> </li>

    <li class="actionMenuItem"><a href="">Option 2</a> </li>



    Please help

Back to Top