I have created 2 functions. I call "findTitleNew" from "createNewOne". I reach a document in "createNewOne" function but when i return to function "findTitleNew" I lost the document that was found in "findTitleNew" How to continue without losing that document? NOTE: This functions are generic because I use those functions more than once in applications.
<xp:button value="Create" id="btnCreate">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete" immediate="false" save="true">
<xp:this.action><![CDATA[#{javascript:createNewDoc(document1)}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
function findTitleNew(currDoc:NotesXSPDocument)
{
try
{
var dbOther1:NotesDatabase = session.getDatabase(database.getServer(),sessionScope.kontak_db_Path);
if (currDoc.getItemValueString("UNID")!="")
{
var otherDoc:NotesDocument = dbOther1.getDocumentByUNID(currDoc.getItemValueString("UNID"))
}
}
catch (e)
{
requestScope.status = e.toString();
}
}
function createNewOne(docThis:NotesXSPDocument)
{
try
{
//do stafff
findTitleNew(docThis)
//do stafff
}
catch (e)
{
requestScope.status = e.toString();
}
}
Any suggestion is appreciated.
Cumhur Ata