<a href="javascript:;" onclick="if(confirm('Are you sure?'))
{remove2('{!oplist.lineNumber1}');}">
<img src="{!$Resource.Red_Cross}" alt="Remove" title="Remove" /></a>
<apex:actionFunction name="remove2" action="{!removeoppline2}" reRender="thePB">
<apex:param name="name" value="rono" assignTo="{!proname}" />
</apex:actionFunction>
I also want to send record id like {!oplist.opplineNo.id} on remove image click..how can i send both line number and recordid simontaneously....pl help me with it
UPDATED
for(OpportunityLineItem l:lOpp) {
wrapperopllist.add(new linenumberclass(l,m));
m++;
}
<apex:repeat value="{!wrapperopllist}" var="oplist" rows="{!PageSize}" id="wrapid">
<tr height="50px">
<td class="Tdtext">{!oplist.lineNumber}
<div id="{!rno}" style="display:none">
<apex:image value="{!$Resource.Warning_Image}" height="15px" id="im" />
</div>
</td>
<td class="Tdtext">{!oplist.oppLineNo.PricebookEntry.Product2.name}
</td>
<td class="Tdtext">
<apex:inputField value="{!oplist.oppLineNo.Exclusive__c}" />
</td>
<td class="Tdtext">
<apex:inputField value="{!oplist.oppLineNo.TV_Everywhere__c}" />
</td>
<td class="Tdtext">
<apex:inputField value="{!oplist.oppLineNo.Description}" />
</td>
<td class="Tdtext">
<a href="javascript:;" onclick="if(confirm('Are you sure?')){remove1('{!oplist.oppLineNo.id}','{!oplist.lineNumber}');}">
<img src="{!$Resource.Red_Cross}" alt="Remove" title="Remove" />
</a>
<apex:variable value="{!rno+1}" var="rno" />
</td>
</tr>
</apex:repeat>
<apex:actionFunction name="remove1" action="{!removeoppline}" reRender="thePB">
<apex:param name="id" value="rno" assignTo="{!deleteid}" />
<apex:param name="name" value="rno" assignTo="{!proname}" />
<apex:actionFunction/>
remove method
public void removeoppline() {
system.debug('==='+wrapperopllist);
System.debug('"""""""""""'+deleteid);
wrapperopllist.remove(proname-1);
for(Integer i = proname-1; i < wrapperopllist.size(); i++) {
wrapperopllist[i].linenumber=proname;
proname++;
}