Guest User

Untitled

a guest
Feb 18th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. <tbody id="co-storebody">
  2. <tr style="display:none;">
  3. <apex:repeat value="{!speCondscValues}" var="speConds" >
  4. <apex:variable var="index" value="{!index +1}" />
  5. <tr>
  6.  
  7. <td>
  8. <div>{!index}</div>
  9. </td>
  10. <td>
  11. <div>{!speConds}
  12. </div>
  13. </td>
  14.  
  15. <td>
  16. <div><!--<apex:inputText styleClass="slds-input" style="" id="remarksVal"
  17. />-->
  18. <input type="text" class="slds-input" id="{!index}"/><br/>
  19.  
  20. <p id="error" style="color:red;"></p>
  21.  
  22.  
  23. <!--<apex:inputHidden id="hdnRep2" value="{}"/> -->
  24. </div>
  25.  
  26.  
  27. //js function This will be called on change of checkbox
  28.  
  29. Function enableRemarks(checkBox,inputId,speCond){
  30.  
  31. var remarks = document.getElementById(inputId);//The id is dynamic
  32. checkObj = checkBox;
  33. inputValue = inputId;
  34. if(checkBox.checked){
  35. if(remarks.value == ''){
  36. alert('hihi');
  37. document.getElementById('error').innerHTML = remarks.validationMessage;
  38. }
  39. specConds.push(speCond);
  40. }
  41.  
  42. else{
  43.  
  44. specConds.splice(specConds.indexOf(speCond),1);
  45. }
  46.  
  47. }
Add Comment
Please, Sign In to add comment