A non-closeable xe:dialog


<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
	xmlns:xe="http://www.ibm.com/xsp/coreex">

	<xp:button value="Open non-closable dialog" id="button1">
		<xp:eventHandler event="onclick" submit="false">
			<xp:this.script><![CDATA[XSP.openDialog('#{id:dialog1}');]]></xp:this.script>
		</xp:eventHandler>
	</xp:button>

	<xe:dialog id="dialog1" title="Non closeable dialog">
		<xe:this.onShow><![CDATA[
			this.onCancel = function(evt){
					if (confirm('Would you like to close the dialog?')){
						XSP.closeDialog(this.id);
					}else{
						dojo.stopEvent(evt);
						return false;
					}				
			};
			
			]]></xe:this.onShow>

		<xp:label value="This is a non-closable dialog" id="label1"></xp:label>
	</xe:dialog>


</xp:view>
All code submitted to OpenNTF XSnippets, whether submitted as a "Snippet" or in the body of a Comment, is provided under the Apache License Version 2.0. See Terms of Use for full details.
No comments yetLogin first to comment...