"Save" button on Dojo Dialog box is not working

Hi all,

In my proram, dojo dialog loading is ok. But the button “save” on this dialog is not working. :frowning:

Please help.

Here is my XPage code.

The error is like that.

‘ParentNote’ is null or not an object.


<?xml version="1.0" encoding="UTF-8"?>

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

dojoTheme=“true”>

xp:this.data

<xp:dominoDocument var=“dominoDocument1”

computeWithForm=“onsave” formName=“MyDilaogData”>

</xp:dominoDocument>

</xp:this.data>

xp:this.resources

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

<xp:script src=“/CodeForPickList.js” clientSide=“true”></xp:script>

</xp:this.resources>

<div id="myDialogWrapper" dojoType="dijit.Dialog"

style=“display:none”>

<xp:panel id=“myDialog”>

<xp:label value=“Hi This is testing.” id=“label1”></xp:label>

xp:br</xp:br>

<xp:inputText id=“inputText3” value=“#{dominoDocument1.mydata}”></xp:inputText>

<xp:button value=“Save” id=“button1”>

<xp:eventHandler event=“onclick” submit=“true”

refreshMode=“complete” immediate=“false” save=“true”></xp:eventHandler>

</xp:button>

xp:br</xp:br>

</xp:panel>

dojo.addOnLoad(function() {

dialog_create(“myDialogWrapper”); // This function called from Client JS file as shown at the bottom.

});

<xp:button value=“Show” id=“button2”>

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

xp:this.handlers

<xp:handler type=“text/javascript”>

xp:this.script</xp:this.script>

</xp:handler>

</xp:this.handlers>

</xp:eventHandler>

</xp:button>

</xp:view>


This is the Client Side Javascript Codes, (CodeForPickList.js)

Here is the codes.

function dialog_create(id) {

var dialogWidget = dijit.byId(id);

if( dialogWidget )

dialogWidget.destroyRecursive(true);

dialogWidget = new dijit.Dialog(

{ },

dojo.byId(id));

var dialog = dojo.byId(id);

dialog.parentNode.removeChild(dialog);

var form = document.forms[0];

form.appendChild(dialog);

dialogWidget.startup();

}