GWY
2022-04-15 b823c7f3569cf9368e2245846e918f78f32e903a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<apex:page standardController="Quote" showHeader="false" sidebar="false" pageStyle="Quote" >
    <script type="text/javascript">
        function closeMe() {
            top.window.close();
        }
        function sendText(str) {
            str = document.forms['{!$Component.mainForm}']['{!$Component.mainForm.page1.exceltext}'].value;
            //top.window.opener.excelImport(str);
            top.window.opener.excelImportGateway(str);
            top.window.close();
        }
        function setCB() {
             //txt = document.forms['{!$Component.mainForm}']['{!$Component.mainForm.page1.exceltext}'].value;
             txt = window.clipboardData.getData("text");
             document.forms['{!$Component.mainForm}']['{!$Component.mainForm.page1.exceltext}'].value = txt;
        }
    </script>
    <apex:form id="mainForm">
        <apex:pageBlock id="page1">
            <table>
                <tr>
                    <td><u><apex:outputLabel value="{!$Label.ImportText}"/></u></td>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td colspan="2"><apex:outputLabel value="{!$Label.Tab_Text}"/></td>
                    <td>&nbsp;<!-- <apex:commandButton onclick="setCB()" style="width:100px" value="{!$Label.Paste_IE}" /> --></td>
                </tr>
                <tr>
                    <td colspan="3"><apex:inputTextarea style="width:350px;height:100px" id="exceltext"/></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                    <td><apex:commandButton onclick="closeMe()" style="width:100px" value="{!$Label.Cancel}"/></td>
                    <td><apex:commandButton onclick="sendText('dummy');return false;" style="width:100px" value="{!$Label.Registration}"/></td>
                </tr>
            </table>
        </apex:pageBlock>
    </apex:form>
</apex:page>