0

I have several buttons on my xpages side (openpage, savedocument, cancel, response). All works on Firefox and Chrome, but doesn't work on Internet Explorer. But there's in an upload file button, and it works. That's the only button works on my page in IE, but I don't know why. There are links in a custom control and they work.

Server: Lotus Domino 8.5.3 FixPack6, IE11.

Is there any idea about it?

The problematic code snippet:

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
    <xp:this.data>
        <xp:dominoDocument var="document1" formName="document_form"></xp:dominoDocument>
    </xp:this.data>
    <xp:button value="Save" id="button1">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action>
                <xp:saveDocument></xp:saveDocument>
            </xp:this.action>
        </xp:eventHandler>
    </xp:button>
    <xp:button value="Cancel" id="button2">
        <xp:eventHandler event="onclick" submit="true"
            refreshMode="complete">
            <xp:this.action>
                <xp:actionGroup>
                    <xp:setComponentMode cancel="true" mode="edit">
                    </xp:setComponentMode>
                    <xp:openPage name="$$PreviousPage">
                    </xp:openPage>
                </xp:actionGroup>
            </xp:this.action>
        </xp:eventHandler>
    </xp:button>
    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:table>
        <xp:tr>
            <xp:td>
                Subject:
            </xp:td>
            <xp:td>
                <xp:inputText id="inputText1" value="#{document1.Subject}"
                    style="width:684.0px">
                    <xp:this.defaultValue><![CDATA[#{javascript:if(document1.isResponse() == true){
    var response = "   -   Response to ";
    return response+session.getCurrentDatabase().getDocumentByUNID(document1.getParentId()).getItemValue("Subject").toString();
}}]]></xp:this.defaultValue>
                </xp:inputText>
            </xp:td>
        </xp:tr>
        <xp:tr>
            <xp:td>
                Workpackage:
            </xp:td>
            <xp:td>
                <xp:comboBox id="comboBox1" value="#{document1.work_group}"
                    rendered="#{javascript:!document1.isResponse();}">
                    <xp:this.defaultValue><![CDATA[#{javascript:if(document1.isResponse() == true){
    var response = "   -   Response to ";
    return response+session.getCurrentDatabase().getDocumentByUNID(document1.getParentId()).getItemValue("Subject").toString();
}}]]></xp:this.defaultValue>
                    <xp:selectItem itemLabel="-" itemValue="-">
                    </xp:selectItem>
                    <xp:selectItems>
                        <xp:this.value><![CDATA[#{javascript:if(context.getUser().getRoles().contains('[wp1]')){
    var myOpt = new Array();
    myOpt[0] = "Workpackage1";
}else if(context.getUser().getRoles().contains('[wp2]')){
    var myOpt = new Array();
    myOpt[0] = "Workpackage2"
}else if(context.getUser().getRoles().contains('[wp_all]')){
    var myOpt = new Array();
    myOpt[0] = "Workpackage1"
    myOpt[1] = "Workpackage2"
    myOpt[2] = "Workpackage3"
    myOpt[3] = "Workpackage4"
    myOpt[4] = "Workpackage5"
    myOpt[5] = "Workpackage6"
    myOpt[6] = "Workpackage7"
    myOpt[7] = "Workpackage8"
}
return myOpt;}]]></xp:this.value>
                    </xp:selectItems>
                    <xp:eventHandler event="onchange" submit="true"
                        refreshMode="partial">
                        <xp:this.script>
                            <xp:executeClientScript>
                                <xp:this.script><![CDATA[XSP.partialRefreshGet("#{id:comboBox6}", {
        onComplete: function() {
            XSP.partialRefreshGet("#{id:comboBox5}")
        }
    });]]></xp:this.script>
                            </xp:executeClientScript>
                        </xp:this.script>
                    </xp:eventHandler>
                </xp:comboBox>
            </xp:td>
        </xp:tr>
        <xp:tr>
            <xp:td>
                Task:
            </xp:td>
            <xp:td>
<xp:comboBox id="comboBox5" value="#{document1.task}"
                    rendered="#{javascript:!document1.isResponse();}">
                    <xp:selectItems>
                        <xp:this.value><![CDATA[#{javascript:if(getComponent("comboBox1").getValue() == "Workpackage1"){
    var myOpt = new Array();
    myOpt[0] = "-";
}else if(getComponent("comboBox1").getValue() == "Workpackage2"){
    var myOpt = new Array();
    myOpt[0] = "-"
}else{
    var myOpt = new Array();
    myOpt[0] = "-";
}
return myOpt;}]]></xp:this.value>
                    </xp:selectItems>
                    <xp:eventHandler event="onchange" submit="true"
                        refreshMode="partial" refreshId="comboBox6">
                    </xp:eventHandler>
                </xp:comboBox>

            </xp:td>
        </xp:tr>
        <xp:tr>
            <xp:td>
                Deliverable:
            </xp:td>
            <xp:td>
                <xp:comboBox id="comboBox6" value="#{document1.deliverable}"
                    rendered="#{javascript:!document1.isResponse();}">
                    <xp:selectItems>
                        <xp:this.value><![CDATA[#{javascript:if(getComponent("comboBox1").getValue() == "Workpackage1"){
    var myOpt = new Array();
    myOpt[0] = "-";
    myOpt[1] = "D1.1x";
    myOpt[2] = "D1.2";
    myOpt[3] = "D1.3";
}else if(getComponent("comboBox1").getValue() == "Workpackage2"){
    var myOpt = new Array();
    myOpt[0] = "-"
    myOpt[1] = "D2.1"
    myOpt[2] = "D2.2"
    myOpt[3] = "D2.3"
    myOpt[4] = "D2.4.1"
    myOpt[5] = "D2.4.2"
}else{
    var myOpt = new Array();
    myOpt[0] = "-";
}
return myOpt;}]]></xp:this.value>
                    </xp:selectItems>
                    <xp:eventHandler event="onchange" submit="true"
                        refreshMode="complete">
                    </xp:eventHandler>
                </xp:comboBox>
            </xp:td>
        </xp:tr>
        <xp:tr>
            <xp:td>
                Short description:
            </xp:td>
            <xp:td>
                <xp:inputRichText id="inputRichText1"
                    value="#{document1.short_description}">
                </xp:inputRichText>
            </xp:td>
        </xp:tr>
        <xp:tr>
            <xp:td>
                File upload:
            </xp:td>
            <xp:td>
                <xp:div id="fileUploadContainer">
                    <div style="margin-top:1em">
                        <xp:br></xp:br>
                        <xp:table>
                            <xp:this.rendered><![CDATA[#{javascript:if((context.getUserAgent().isFirefox() == true) || (context.getUserAgent().isChrome() == true) || (context.getUserAgent().isIE() == true) || (context.getUserAgent().isOpera() == true) || (context.getUserAgent().isSafari() == true)){
    return false;
}else{
    return true;
}}]]></xp:this.rendered>
                            <xp:tr>
                                <xp:td style="width:520px">

                                    <xp:fileUpload id="fileUpload1" value="#{document1.files}">
                                    </xp:fileUpload>
                                </xp:td>
                                <xp:td style="width:10px">
                                    <xp:inputHidden id="saveOptions" required="true"
                                        disableClientSideValidation="true" value="#{document1}">
                                    </xp:inputHidden>
                                </xp:td>
                                <xp:td>
                                    <xp:button value="Upload" id="button12" style="height:21px">
                                        <xp:eventHandler event="onclick" submit="true"
                                            refreshMode="complete" id="eventHandler1">
                                            <xp:this.action>
                                                <xp:saveDocument></xp:saveDocument>
                                            </xp:this.action>
                                            <xp:this.script><![CDATA[var id = "#{id:saveOptions}";
dojo.byId(id).value="1";]]></xp:this.script>
                                        </xp:eventHandler>
                                    </xp:button>
                                </xp:td>
                            </xp:tr>
                        </xp:table>
                        <xp:br></xp:br>
                        <xp:fileDownload rows="30" id="fileDownload1"
                            displayLastModified="false" value="#{document1.files}" hideWhen="true"
                            allowDelete="true" style="width:100.0%">
                        </xp:fileDownload>
                        <xp:br></xp:br>
                    </div>
                </xp:div>
            </xp:td>
        </xp:tr>
    </xp:table>
    <xp:br></xp:br>
    <xp:span style="font-weight:bold">Modified</xp:span>
    <xp:span style="font-weight:bold">by:</xp:span>
    <xp:br></xp:br>
    <xp:inputText id="inputText3" disabled="true"
        value="#{document1.modified_by}" defaultValue="#{javascript:sessionScope.commonUserName}">
    </xp:inputText>
    <xp:br></xp:br>
    <xp:span style="font-weight:bold">Last modificati</xp:span>
    <xp:span style="font-weight:bold">on:</xp:span>
    <xp:br></xp:br>
    <xp:inputText id="inputText4" value="#{document1.last_modification}"
        disabled="true" defaultValue="${javascript:@Now()}">
        <xp:this.converter>
            <xp:convertDateTime type="date" dateStyle="short">
            </xp:convertDateTime>
        </xp:this.converter>
    </xp:inputText>
    <xp:br></xp:br>
    <xp:span style="font-weight:bold">Created:</xp:span>
    <xp:br style="font-weight:bold"></xp:br>
    <xp:inputText id="inputText5" value="#{document1.created}"
        disabled="true">
        <xp:this.defaultValue><![CDATA[#{javascript:if(document1.isNewNote()){
    @Now();
}else{
    document1.getItemValueDate("created");
}}]]></xp:this.defaultValue>
        <xp:this.converter>
            <xp:convertDateTime type="date" dateStyle="short">
            </xp:convertDateTime>
        </xp:this.converter>
    </xp:inputText>
</xp:view>
  • Have you looked into IE console? – Dmytro Pastovenskyi Oct 08 '15 at 14:33
  • 3
    You should elaborate on the exact IE version, the server version (including any fix packs/hot fixes), the installed Extlib version if any, and also include code snippets. It's impossible to help with such a limited description of the issue – Brian Gleeson - IBM Oct 08 '15 at 14:48
  • Server: Lotus Domino 8.5.3 FixPack6, IE11. I am on smartphone now, so I could not provide code now. What sections do you need? Additional info: the buttons don't work on Android Chrome too. – AttilaBorbás Oct 08 '15 at 16:33
  • A sample xpage with buttons on it that can reproduce the problem. – Brian Gleeson - IBM Oct 09 '15 at 11:38
  • A sample xpage with buttons works fine. So I think I need to generate a page with some functions. The xpage works in compatibility mode and if I request desktop webpage from Android Chrome, it works too. – AttilaBorbás Oct 12 '15 at 09:34
  • I have got the problematic code snippet, I have added to the question above. – AttilaBorbás Oct 12 '15 at 09:39
  • Your code snippet does work on IE 11. It must be something else. Please provide a full example XPage with buttons which fails in your IE 11 environment. – Knut Herrmann Oct 12 '15 at 10:16
  • I have added the whole code above. But if I deleted the modified by, modified, and created sections it works fine. That's why I thought that could be the solution. – AttilaBorbás Oct 12 '15 at 14:40
  • That's not what I asked for. You posted your complete page with all dependencies like custom controls we don't have. I asked for a simplified XPage which shows the error on IE 11 but is as short as possible and doesn't depend on other design elements. – Knut Herrmann Oct 12 '15 at 14:51
  • I re-edited the code. I tried to shorten it, but there are some comboBoxes that has got different events, that's why I left them in the code. Hope it will be better. – AttilaBorbás Oct 12 '15 at 15:28
  • I looked into IE console and I got this: P=H.$.createEvent('KeyEvents') NotSupportedError I found that in IE11 KeyEvent is not supported, how can I avoid it? – AttilaBorbás Oct 15 '15 at 15:05

2 Answers2

0

This is just a shot in the dark but have you attempted to turn off compatibility mode?

Pages does not render properly in IE 11 when using the bootsrapv3.0.0 theme

Community
  • 1
  • 1
Patrick Sawyer
  • 1,362
  • 7
  • 22
  • If I add my site to the compatibility mode, the buttons work but the design slips apart. But maybe this could be a solution. – AttilaBorbás Oct 12 '15 at 08:58
  • Well I think you are onto something then. Yes compatibility mode will not work with some things. I have another answer that details what you can do to get IE working in bootstrap. – Patrick Sawyer Oct 12 '15 at 17:49
  • Looking at your code, I would get rid of styles. I try not to use them and prefer styleClass to use CSS. – Patrick Sawyer Oct 12 '15 at 17:50
0

Check the Dojo version in use. Internet Explorer is very draconian in abandoning support for older versions of Dojo. Bearing in mind that all button actions (partial refreshes etc) go through a client-side Dojo extension library, you could be finding that Internet Explorer 11 (which is quite recent) does not support the version of Dojo delivered with 8.5.3 (which is several years old). Internet Explorer is supported with Domino 9.0.1 FP2 (just over a year old) http://per.lausten.dk/blog/2014/08/xpages-and-domino-9-0-1-fp2-upgrades-to-ckeditor-and-dojo.html.

Paul Stephen Withers
  • 15,699
  • 1
  • 15
  • 33