javascript - XPages - change background color of place bar button -
i change background color of place bar button when button clicked. how can this? have considered using dojo or javascript don't see how can "id" place bar button.
"another solution steve zavocki in green." code not using jquery dont have integrate jquery.js in application can using native javascript , dojo wich integrated in xpages dont have overhead.
there other ways element javascrip:
document.getelementbyid dcoument.getelementsby classname, name, tagname, tagnamens with dojo or steve used in code jquery:
<xp:button value="changecolor" id="button1"> <xp:eventhandler event="onclick" submit="false"> <xp:this.script><![cdata[var placebar = document.getelementsbyclassname("lotusplacebar")[0]; //place bar should unique placebar.style.backgroundcolor = "green"; placebar.style.backgroundimage = "none"; //.. more styling;]]></xp:this.script> </xp:eventhandler> </xp:button>
Comments
Post a Comment