This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 18, 2016, 6:28 AM
41 Posts
topic has been resolvedResolved

Button not firing on a page

  • Category: Debugging
  • Platform: All
  • Release: 9.0.1
  • Role: Developer
  • Tags:
  • Replies: 2

Hi,

 

Am working on an application, there are couple of buttons on each page - log on and search (takes you to a search page).  These are statc pages, not open for editing. For some reason, which I can't figure out, when I click on the button NOTHING happens. Below is the code for the page to open the search button.

 

                                       <xp:button id="button2" styleClass="btn btn-default">
                                            <span class="icon-search"></span>Search
                                           <xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true">
                                                <xp:this.script><![CDATA[window.open("Search.xsp","_self")]]></xp:this.script>
                                            </xp:eventHandler>
                                        </xp:button>

Just to be certain I've just tried

                                     <xp:button id="button2" styleClass="btn btn-default">
                                            <span class="icon-search"></span>Search
                                            <xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true">
                                                
                                                <xp:this.action>
                                                    <xp:openPage
                                                        name="/Search.xsp">
                                                    </xp:openPage>
                                                </xp:this.action></xp:eventHandler>
                                        </xp:button>

Same, nothing happens.  Even further....

                                        <xp:button id="button2" styleClass="btn btn-default">
                                            <span class="icon-search"></span>Search
                                            <xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="true">
                                                
                                                <xp:this.action>

                                                    <xp:actionGroup>
                                                    <xp:executeScript>
                                                            <xp:this.script><![CDATA[#{javascript:print("Is this being clicked??")}]]></xp:this.script>
                                                        </xp:executeScript>
                                                        <xp:openPage
                                                            name="/Search.xsp">
                                                        </xp:openPage>
                                                        
                                                    </xp:actionGroup>
                                                </xp:this.action></xp:eventHandler>
                                        </xp:button>

Nothing written in the log. Am hoping someone might have some suggestions.

 

Thanks,

 

Cameron

May 18, 2016, 12:21 PM
586 Posts
hmmm

I'd be interested in you posting the complete code...  not just the button and variants.  

 

For instance, I've seen an eventhandler get attached to the main xp:view tag by accident. That has broken buttons from working.

 

That's all I can think of at the moment.  You say nothing is written to the log... which to me imply's the server console log.nsf.  The other thing to make sure to check is to go into debug mode on your browser and see if there's anything showing in that log.  An unexpected error there could break buttons from working.

 

Good Luck

 

 

May 18, 2016, 10:09 PM
41 Posts
Solved it

Hi David,

 

Thanks for the reply. As per usual, walk away from something and it clears your head. Was the ordering of a couple of Javascript libraries. Changed the order and now it's working.

 

Cameron


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal