You need to sign in to do that
Don't have an account?
How to give user defined id to an apex:image
Hi
I would like to give dynamic ids based on the no of result which I get.
Like
newTextBoxDiv.after().html('<table><tr><td><input type="text" name="textbox' + counter +
'" id="textbox' + counter + '" value="" style="padding:5px 0px 0px 0px;" ></td><td style="display: block;"><img src="r-arrow.png" alt="" onClick="functionCall(this.id)" id="textBox2RightArrowImage1' + counter + '"></td>'+
'<td style="display: none;"><img src="d-arrow.png" alt="" id="textBox2DownArrowImage1' + counter + '"></td></tr></table>');
it is working in html but not in apex.
Any help is appreciated.
<apex:variable value="{!0}" var="rowNum"/>
<apex:dataTable value="{!dataValue}" var="val" id="pgblk_tbl" >
<apex:column>
--------------
----------------
<apex:variable var="rowNum" value="{!rowNum + 1}"/>
</apex:column>
</apex:dataTable>
Instead of datatable If you are using any other tags like repeat or pageblocktable will also work similarly