Friday, December 30, 2011

dijit.Dialog in Dojo

Here i given example for how you increase your Dojo dialog Size and add title.


Souce code:

<?xml version=”1.0″ encoding=”UTF-8″?>

<xp:view xmlns:xp=”http://www.ibm.com/xsp/core” dojoParseOnLoad=”true”

dojoTheme=”true”>

<xp:this.resources>

<xp:dojoModule name=”dijit.Dialog” ></xp:dojoModule>

</xp:this.resources>

<div dojoType=”dijit.Dialog” id=”test” title= “My Dialog” style= “width: 300px ;height:200px”>

<xp:label value=”Test Dialog create by dojo” id=”label1″></xp:label>

</div>

<xp:button value=”Label” id=”button1″>

<xp:eventHandler event=”onclick” submit=”false”>

<xp:this.script><![CDATA[dijit.byId("test").show()]]></xp:this.script>

</xp:eventHandler></xp:button></xp:view>


<?xml version=”1.0″ encoding=”UTF-8″?>


<xp:view xmlns:xp=”http://www.ibm.com/xsp/core” dojoParseOnLoad=”true”


dojoTheme=”true”>


<xp:this.resources>


<xp:dojoModule name=”dijit.Dialog” ></xp:dojoModule>


</xp:this.resources>


<div dojoType=”dijit.Dialog” id=”test” title= “My Dialog” style= “width: 300px ;height:200px”>


<xp:label value=”Test Dialog create by dojo” id=”label1″></xp:label>


</div>


<xp:button value=”Label” id=”button1″>


<xp:eventHandler event=”onclick” submit=”false”>


<xp:this.script><![CDATA[dijit.byId("test").show()]]></xp:this.script>


</xp:eventHandler></xp:button></xp:view>


Explanantion:


Title attribute used for add title to dojo dialog and style attribute used for alignment and size


No comments:

Post a Comment