Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:pageBlockTable value="{!WrapperOrder}" onclick="insert_numbers()" var="or" id="pbtable">
- <apex:column headerValue="No." >
- <apex:outputText value="{0}" style="text-align:center;">
- <apex:inputField value="{!or.rorli.Row_Num__c}" id="getindex" Style="width:15px" />
- <apex:param value="{!rowNumber+1}" />
- </apex:outputText>
- </apex:column>
- <apex:column headerValue="Nicomatic P/N" >
- <apex:inputField value="{!or.rorli.Name}" id="pnname" required="true" styleClass="theqid"/>
- </apex:column>
- <apex:column headerValue="Client P/N" >
- <apex:inputField value="{!or.rorli.Client_Pn__c}" Style="width:110px" />
- </apex:column>
- <apex:column headerValue="Description" >
- <apex:inputField value="{!or.rorli.Description__c}"/>
- </apex:column>
- <apex:column headerValue="Confirmed Shipping Date" >
- <apex:inputField value="{!or.rorli.Confirmed_Shipping_Date__c}"/>
- </apex:column>
- <apex:column headervalue="Batch Price and Quantity" >
- <table border="1px">
- <tr>
- <th>Price</th>
- <th>Quantity</th>
- <th>Action</th>
- </tr>
- <apex:repeat value="{!or.batc}" var="ba" >
- <tr>
- <td>{!ba.Unit_Price__c}</td>
- <td>{!ba.Asked_Qty__c}</td>
- <td><input type="checkbox" onclick="" id="checx" class="checx"/></td>
- </tr>
- </apex:repeat>
- </table>
- </apex:column>
- <apex:column headerValue="Unit Price" >
- <!-- <input type="text" id="two" value="{!or.rorli.Price__c}" Style="width:60px" name="two" /> -->
- <apex:inputField id="rpri" value="{!or.rorli.Price__c}" Style="width:50px" styleClass="spri[rowNumber]" />
- </apex:column>
- <apex:column headerValue="Qty" id="col" >
- <!--<input type="text" id="one" value="{!or.rorli.Quantity__c}" Style="width:60px" name="one" /> -->
- <apex:inputField id="rqty" value="{!or.rorli.Quantity__c}" Style="width:25px" styleClass="sqty[rowNumber]"/>
- </apex:column>
- </apex:pageblocktable>
- <script type="text/javascript">
- checkboxes = document.getElementsByClassName("checx");
- for (var i = 0; i < checkboxes.length; i++) {
- var checkbox = checkboxes[i];
- checkbox.onclick = function() {
- var currentRow = this.parentNode.parentNode;
- var secondColumn = currentRow.getElementsByTagName("td")[1];
- var FirstColumn = currentRow.getElementsByTagName("td")[0];
- alert("My text is: " + secondColumn.textContent +" "+FirstColumn.textContent);
- $('.sqty').val(secondColumn.textContent);
- $('.spri').val(FirstColumn.textContent);
- };
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement