PDA

View Full Version : Download file into local disk.


techy_kans
09-27-2007, 08:03 AM
HI, i am presentely working with downloading file into localdisk i am able to download a file i.e., it's populating the saving popup box and i am giving the filename and clicking save button it's saving into desired location but when i open that file it's having the content like some error msg" error" i am not getting exact data into that file.
I am placing my code here plz anyone can help me out it's urgent.....


In project.lzx

(look at : launcherId.downloadCss(downloadid); method())
--------------------------------------------------------------------------------------------
<library>
<class name="project" extends="basecomponent">
<tabslider id="projectTabId" width="${parent.width-10}" x="5" y="5"
height="${parent.height-10}"
spacing="2" slideduration="300">
<tabelement id="tabProjectPrefId" text="Project Preferences">
<view y="5" width="100%" height="${parent.height-15}">
<simplelayout axis="y" spacing="10" />
<text multiline="true" resize="true" width="100%">
Project preferences control required values like font, font size
and error messages.
</text>
<text multiline="true" resize="true" width="100%">
Each project is initialized with default values but there
are some that should be changed like the survey title.
</text>
<hoverbutton text="Edit..." style="cssBasicComp">
<handler name="onclick">
<![CDATA[
//load preferences xml file from server and launch editor
classroot.loadProjectPrefs();
launcherId.navProjectPrefs();
]]>
</handler>
</hoverbutton>
</view>
</tabelement>
<tabelement id="tabTreesId" text="Decision Trees" onselect="treeBuilderId.listDecisionTrees()">
<view y="5" width="100%" height="${parent.height-15}">
<simplelayout axis="y" spacing="5" />
<view name="toolbar">
<simplelayout axis="x" spacing="25" />
<tbbutton renderResource="es_small_filenew" width="18">
<handler name="onclick">
launcherId.newDesitionTree();
</handler>
</tbbutton>
</view>
<textlistitem style="cssBaseList" value="$path{'@id'}" height="65">
<datapath xpath="dstreefiles:/response/files/decisiontrees/file" sortpath="@name" />
<roundborder width="100%" borderRadius="0" height="${parent.height}" shadowY="0" styleable="false">
<simplelayout axis="y" spacing="5" />
<view width="100%">
<simplelayout axis="y" spacing="5" />

<text width="100%" fontsize="10" fontstyle="bold" datapath="@name">
</text>
<view>
<simplelayout axis="x" spacing="10" />
<text text="&lt;u&gt;Edit&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
treeBuilderId.loadDecisionTree(this.fid);
TreeListId.setAttribute("treeEdited", this.fid);
launcherId.navTreeBuilder();
</handler>
</text>
<text text="&lt;u&gt;Delete&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
classroot.deleteDecisionTree(this.fid);
</handler>
</text>
</view>
</view>
<view width="100%">
<text datapath="@username" fontsize="12" fontstyle="bold" width="${parent.width}" resize="true">
</text>
</view>
</roundborder>
</textlistitem>

</view>
</tabelement>


<tabelement text="Results Pages and Analytics" onselect="classroot.listScoreBuilderFiles()">

<view y="5" width="100%" height="${parent.height-15}">
<simplelayout axis="y" spacing="5" />
<view name="toolbar">
<simplelayout axis="x" spacing="25" />
<tbbutton renderResource="es_small_filenew" width="18">
<handler name="onclick">
launcherId.createResultAnalyticalDoc();
</handler>
</tbbutton>

</view>
<list id="listDocumentsId" style="cssContent" width="100%" height="${parent.height-50}">
<attribute name="documentOpened" value="0"/>
<attribute name="documentType" value="0"/>
<handler name="onvalue">
//classroot.load(this.value);
</handler>
<textlistitem style="cssBaseList" value="$path{'@id'}" height="65">

<datapath xpath="dsscorefiles:/response/documents/document" sortpath="@name" />
<roundborder width="100%" borderRadius="0" height="${parent.height}" shadowY="0" styleable="false">
<simplelayout axis="y" spacing="5" />
<view width="100%">
<simplelayout axis="y" spacing="5" />
<text width="100%" fontsize="10" fontstyle="bold" datapath="@name">
</text>
<view>
<simplelayout axis="x" spacing="10" />
<text text="&lt;u&gt;Edit&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<attribute name="type" value="$path{'@type'}" />
<handler name="onclick">
listDocumentsId.setAttribute("documentType",type);
if(type=="Analytics"){
listDocumentsId.setAttribute("documentOpened",fid);
classroot.openDocument(fid,type);
launcherId.navScoreBuilder();

}
if(type=="Results"){
listDocumentsId.setAttribute("documentOpened",fid);
classroot.openDocument(fid,type);
launcherId.navResultBuilder();
}

</handler>
</text>
<text text="&lt;u&gt;Delete&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
classroot.deleteDocument(fid);
</handler>
</text>
</view>
</view>
<view width="100%">
<text datapath="@username" fontsize="12" fontstyle="bold" width="${parent.width}" resize="true">
</text>
</view>
</roundborder>
</textlistitem>

</list>
</view>
</tabelement>
<tabelement text="Content" onselect="classroot.listContentFiles()">
<view y="5" width="100%" height="${parent.height-15}">
<simplelayout axis="y" spacing="5" />
<view name="toolbar">
<simplelayout axis="x" spacing="25" />
<tbbutton renderResource="es_small_filenew" width="18">
<handler name="onclick">
//classroot.listContentFiles();
launcherId.newContentFile();

</handler>
</tbbutton>

</view>
<list id="ContentTabListId" style="cssContent" width="100%" height="${parent.height-50}">
<attribute name="contentFileId" type="string" value=""/>
<handler name="onvalue">
//classroot.load(this.value);
</handler>
<textlistitem id="projectListItemId" style="cssBaseList" value="$path{'@id'}" height="65">

<datapath xpath="dsprojectfiles:/response/files/contentfiles/file" sortpath="@name" />
<roundborder width="100%" borderRadius="0" height="${parent.height}" shadowY="0" styleable="false">
<simplelayout axis="y" spacing="5" />
<view width="100%">
<simplelayout axis="y" spacing="5" />

<text width="100%" fontsize="10" fontstyle="bold" datapath="@name">
</text>
<view>
<simplelayout axis="x" spacing="10" />
<text text="&lt;u&gt;Edit&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
classroot.loadContentFile(this.fid);
ContentTabListId.setAttribute("contentFileId",this.fid);
var ds = canvas.datasets.dsprojectfiles;
var ptr_temp = ds.getPointer();
ptr_temp.setXPath("response/files/contentfiles");
ptr_temp.selectChild(1);
do{
var fileName = ptr_temp.getNodeAttribute("name");
var fileId = ptr_temp.getNodeAttribute("id");
if(this.fid==fileId){
ptr_temp.setNodeAttribute("selected","true");
}else{
ptr_temp.setNodeAttribute("selected","false");
}
}while(ptr_temp.selectNext());
launcherId.navContent();

</handler>
</text>
<text text="&lt;u&gt;Delete&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
classroot.deleteContentFile(this.fid);
</handler>
</text>
</view>
</view>
<view width="100%">
<text datapath="@username" fontsize="12" fontstyle="bold" width="${parent.width}" resize="true">
</text>
</view>
</roundborder>
</textlistitem>

</list>
</view>
</tabelement>
<tabelement text="Images">
<view y="5" width="100%" height="${parent.height-15}">
<simplelayout axis="y" spacing="5" />
<hoverbutton text="New" style="cssBasicComp" width="60">
<handler name="onclick">
launcherId.open(uploadId);
</handler>
</hoverbutton>
<list style="cssContent" width="100%" height="${parent.height-60}">
<textlistitem style="cssBaseList" value="$path{'@id'}" height="65">

<datapath xpath="dsprojectfiles:/response/files/decisiontrees/file" sortpath="@name" />
<!--<datapath xpath="dsprojectcontentfiles:/response/files/contentfiles/file" sortpath="@name" />-->
<roundborder width="100%" borderRadius="0" height="${parent.height}" shadowY="0" styleable="false">
<simplelayout axis="y" spacing="5" />
<view width="100%">
<simplelayout axis="y" spacing="5" />

<text width="100%" fontsize="10" fontstyle="bold" datapath="@name">
</text>
<view>
<simplelayout axis="x" spacing="10" />
<text text="&lt;u&gt;Edit&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
</handler>
</text>
<text text="&lt;u&gt;Delete&lt;/u&gt;" fgcolor="blue">
<attribute name="fid" value="$path{'@id'}" />
<handler name="onclick">
</handler>
</text>
</view>
</view>
<view width="100%">
<text datapath="@username" fontsize="12" fontstyle="bold" width="${parent.width}" resize="true">
</text>
</view>
</roundborder>
</textlistitem>
</list>
</view>
</tabelement>
<tabelement text="CSS" onselect="launcherId.listCssfiles(1)">
<view y="5" width="100%" height="${parent.height-10}">
<simplelayout axis="y" spacing="5" />
<list style="cssContent" width="100%" height="${parent.height-60}">
<textlistitem style="cssBaseList" value="$path{'@id'}" height="50">
<datapath xpath="dscssfiles:/response/files/css/cssfiles" sortpath="@name" />
<roundborder width="100%" borderRadius="0" height="${parent.height}" shadowY="0" styleable="false">
<view>
<simplelayout axis="y" spacing="10"/>
<view>
<text width="100%" fontsize="10" fontstyle="bold" datapath="@name"/>
</view>
<view>
<simplelayout axis="x" spacing="10"/>
<view>
<hoverbutton text="Upload" style="cssBasicComp" width="60">
<handler name="onclick">
launcherId.open(uploadId);
</handler>
</hoverbutton>
</view>
<view>
<hoverbutton text="Download" style="cssBasicComp" width="70">
<attribute name="downloadid" value="$path{'@id'}" />
<handler name="onclick">
launcherId.downloadCss(downloadid);
</handler>
</hoverbutton>
</view>
</view>
</view>
</roundborder>
</textlistitem>
</list>
</view>
</tabelement>
</tabslider>

<method name="list">
<![CDATA[
waitcursor.on();
var partyid = controllerId.getProjectPartyId();
var projName = projectNavId.title.txtTitle.getAttribute("text");
var ds = canvas.datasets.dsprojects;
dataControllerId.registerDelegate(projectId, "defaultCallback", ds, "ondata");
ds.setQueryParam("action", "list");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("projectName", projName);
ds.doRequest();
]]>
</method>

<method name="defaultCallback">
<![CDATA[
waitcursor.off();

]]>
</method>

<method name="open" args="pid">
<![CDATA[
waitcursor.on();
var ds = canvas.datasets.dsprojectfiles;
var uid = controllerId.getUserId();
dataControllerId.registerDelegate(projectId, "defaultCallback", ds, "ondata");
ds.setQueryParam("action", "listfiles");
ds.setQueryParam("projectId", pid);
ds.setQueryParam("uid", uid);
ds.doRequest();
projectNavId.setVisible(true);
projectTabId.select(tabProjectPrefId);
]]>
</method>
<method name="load" args="pid">
<![CDATA[
if(id != null) {
waitcursor.on();
var ds = canvas.datasets.dsprojectfiles;
var uid = controllerId.getUserId();
dataControllerId.registerDelegate(projectId, "loadCallback", ds, "ondata");
ds.setQueryParam("action", "loadfile");
ds.setQueryParam("id", pid);
ds.setQueryParam("uid", uid);
ds.doRequest();
contentId.setVisible(true);
}
]]>
</method>
<method name="loadCallback">
waitcursor.off();
</method>

<method name="newProject" args="name">
<![CDATA[
waitcursor.on();
var partyid = controllerId.getProjectPartyId();
var ds = canvas.datasets.dsproject;
dataControllerId.registerDelegate(projectId, "newProjectCallback", ds, "ondata");
ds.setQueryParam("action", "save");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("name", name);
ds.doRequest();
]]>
</method>
<method name="newProjectCallback">
waitcursor.off();
var projectName = txtNewProjectName.getText().trim();
var ds = canvas.datasets.dsproject;
var ptr = ds.getPointer();
ptr.setXPath("/response/projects");
ptr.selectChild(1);
do{
var name = ptr.getNodeAttribute("name");
if(name==projectName){
var pid = ptr.getNodeAttribute("id");
projectId.open(pid);
projectNavId.title.txtTitle.setAttribute("text", name);
projectNavId.title.txtId.setAttribute("text", pid);
break;
}
}while(ptr.selectNext());
ds = canvas.datasets.dsproject;
ptr = ds.getPointer();
var isValid = ptr.setXPath("/response/message");
if(isValid){
var errorMsg = ptr.getNodeText();
controllerId.showMessage(errorMsg);
}

</method>
<method name="deleteContentFile" args="fileId">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var partyid = controllerId.getProjectPartyId();
var ds = canvas.datasets.dscontentrepo;
dataControllerId.registerDelegate(projectId, "deleteContentFileCallback", ds, "ondata");
ds.setQueryParam("action", "deletefile");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("projectId", projId);
ds.setQueryParam("fileId", fileId);
ds.doRequest();
</method>

<method name="deleteContentFileCallback">
waitcursor.off();
listContentFiles();
loadContentFile(null);
</method>

<method name="createContentXMLFile" args="xmlFileName">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var partyid = controllerId.getProjectPartyId();
var ds = canvas.datasets.dscontentrepo;
dataControllerId.registerDelegate(projectId, "createContentXMLFileCallback", ds, "ondata");
ds.setQueryParam("action", "createfile");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("projectId", projId);
ds.setQueryParam("name", xmlFileName);
ds.doRequest();
</method>

<method name="createContentXMLFileCallback">
waitcursor.off();
listContentFiles();
var ds = canvas.datasets.dscontentrepo;

</method>

<method name="listContentFiles">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var partyid = controllerId.getProjectPartyId();
var ds = canvas.datasets.dsprojectfiles;
dataControllerId.registerDelegate(projectId, "listContentFilesCallback", ds, "ondata");
ds.setQueryParam("action", "listfiles");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("projectId", projId);
ds.doRequest();
</method>

<method name="listContentFilesCallback">
waitcursor.off();
</method>

<method name="loadContentFile" args="file_id">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var partyid = controllerId.getProjectPartyId();
var ds = canvas.datasets.dscontentfilerepo;
dataControllerId.registerDelegate(projectId, "loadContentFileCallback", ds, "ondata");
ds.setQueryParam("action", "loadfile");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("file_id", file_id);
ds.setQueryParam("projectId", projId);
ds.doRequest();
</method>

<method name="loadContentFileCallback">
<![CDATA[
waitcursor.off();

]]>
</method>

<method name="showContentElement">
launcherId.newContentElement();
</method>

<method name="createContent" args="contentName,contentType">
waitcursor.on();
var contentfileId = ContentTabListId.contentFileId;
var ds = canvas.datasets.dsprojectfiles;
var ptr_temp = ds.getPointer();
ptr_temp.setXPath("response/files/contentfiles/file[@selected = 'true']");
var fileName = ptr_temp.getNodeAttribute("name");
var fileId = ptr_temp.getNodeAttribute("id");
if(contentType=="0"){
controllerId.showMessage("Select a content type");
}else{
addElementRestoreXML(fileName,fileId,contentName,c ontentType);
}
waitcursor.off();
</method>

<method name="addElementRestoreXML" args="filename, fileid, content, contenttype">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var partyid = controllerId.getProjectPartyId();
var ds = canvas.datasets.dscontentfilerepo;
var ptr_temp = ds.getPointer();
ptr_temp.setXPath("/response/repository");
var sequence = ptr_temp.getNodeAttribute("sequence");
var cntID = parseInt(sequence)+1;
ptr_temp.setNodeAttribute("sequence",cntID);
ptr_temp.addNode("content", content+" text", {id:cntID, name:content, type:contenttype});
waitcursor.off();
</method>

<method name="saveContentFile">
waitcursor.on();
var ds = canvas.datasets.dsprojectfiles;
var ptr_temp = ds.getPointer();
ptr_temp.setXPath("/response/files/contentfiles/file[@selected = 'true']");
var fileName = ptr_temp.getNodeAttribute("name");
var fileId = ptr_temp.getNodeAttribute("id");
save(fileId);
</method>

<method name="save" args="fileid">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var partyid = controllerId.getProjectPartyId();
contentTextId.datapath.updateData();
var ds = canvas.datasets.dscontentfilerepo;
var xmlData = ds.getPointer().serialize();
dataControllerId.registerDelegate(projectId, "saveCallback", ds, "ondata");
ds.setQueryParam("action", "savefile");
ds.setQueryParam("partyid", partyid);
ds.setQueryParam("file_id", fileid);
ds.setQueryParam("projectId", projId);
ds.setQueryParam("xml", xmlData);
ds.doRequest();
waitcursor.off();
</method>

<method name="saveCallback">
<![CDATA[
waitcursor.off();
//listContentFiles();
//projectListItemId.datapath.updateData();
]]>
</method>

<method name="deleteContentElement" args="contentid">
waitcursor.on();
var ds = canvas.datasets.dscontentfilerepo;
var ptr = ds.getPointer();
ptr.setXPath("/response/repository/content[@id='"+contentid+"']");
ptr.deleteNode();
waitcursor.off();
</method>

<method name="isProjectExists" args="projName">
var isProjectFound = "false";
var ds = canvas.datasets.dsprojects;
var ptr_temp = ds.getPointer();
var isPtrValid = ptr_temp.setXPath("response/projects/project[1]");
if(isPtrValid){
do{
var projectname = ptr_temp.getNodeAttribute("name");
if(projectname==projName){
isProjectFound="true";
break;
}
}while(ptr_temp.selectNext());
}

return isProjectFound;
</method>
<method name="loadProjectPrefs">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var ds = canvas.datasets.dsprefs;
dataControllerId.registerDelegate(projectId, "defaultCallback", ds, "ondata");
ds.setQueryParam("action", "loadprefs");
ds.setQueryParam("projectId", projId);
ds.doRequest();

</method>
<method name="createResAnalyticsDoc" args="name, type">
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var ds = canvas.datasets.dsscore;
dataControllerId.registerDelegate(projectId, "createResAnalyticsDocCallback", ds, "ondata");
ds.setQueryParam("action", "createdoc");
ds.setQueryParam("docName", name);
ds.setQueryParam("docType", type);
ds.setQueryParam("projectId", projId);
ds.doRequest();

</method>
<method name="createResAnalyticsDocCallback">
<![CDATA[
waitcursor.off();
listScoreBuilderFiles();
]]>
</method>
<method name="listScoreBuilderFiles">
<![CDATA[
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var ds = canvas.datasets.dsscorefiles;
dataControllerId.registerDelegate(projectId, "listScoreBuilderFilesCallback", ds, "ondata");
ds.setQueryParam("action", "listdocs");
ds.setQueryParam("projectId", projId);
ds.doRequest();
]]>
</method>
<method name="listScoreBuilderFilesCallback">
<![CDATA[
waitcursor.off();
]]>
</method>
<method name="openDocument" args="docId, type">
<![CDATA[
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
if(type=="Analytics"){
var ds = canvas.datasets.dsscore;
}
if(type=="Results"){
var ds = canvas.datasets.dsresults;
}
dataControllerId.registerDelegate(projectId, "openDocumentCallback", ds, "ondata");
ds.setQueryParam("action", "loaddoc");
ds.setQueryParam("projectId", projId);
ds.setQueryParam("file_id", docId);
ds.doRequest();
]]>
</method>
<method name="openDocumentCallback">
<![CDATA[
waitcursor.off();
]]>
</method>
<method name="deleteDecisionTree" args="fileId">
<![CDATA[
var projId = projectNavId.title.txtId.getAttribute("text");
var ds = canvas.datasets.dstree;
dataControllerId.registerDelegate(projectId, "deleteDecisionTreeCallback", ds, "ondata");
ds.setQueryParam("action", "deletetree");
ds.setQueryParam("projectId", projId);
ds.setQueryParam("fileId", fileId);
ds.doRequest();
]]>
</method>
<method name="deleteDecisionTreeCallback">
<![CDATA[
waitcursor.off();
treeBuilderId.listDecisionTrees();
listScoreBuilderFiles
]]>
</method>

<method name="deleteDocument" args="docId">
<![CDATA[
waitcursor.on();
var projId = projectNavId.title.txtId.getAttribute("text");
var ds = canvas.datasets.dsscore;
dataControllerId.registerDelegate(projectId, "deleteDocumentCallback", ds, "ondata");
ds.setQueryParam("action", "deletedoc");
ds.setQueryParam("projectId", projId);
ds.setQueryParam("fileId", docId);
ds.doRequest();
]]>
</method>
<method name="deleteDocumentCallback">
<![CDATA[
waitcursor.off();
listScoreBuilderFiles();
]]>
</method>
<method name="listCSSFiles" args="pid">
<![CDATA[
waitcursor.on();
var ds = canvas.datasets.dscssfiles;
dataControllerId.registerDelegate(projectId,"defaultCallback",ds,"ondata");
ds.setQueryParam("action","list");
ds.setQueryParam("projectId",pid);
ds.doRequest();
]]>
</method>

<method name="saveResultsAnalyticalFile">
<![CDATA[
waitcursor.on();
var docType = listDocumentsId.documentType;
var projId = projectNavId.title.txtId.getAttribute("text");
var fileid = listDocumentsId.documentOpened;
var ds;
if(docType=="Analytics"){
ds = canvas.datasets.dsscore;
}
if(docType=="Results"){
resultsView.datapath.updateData();
ds = canvas.datasets.dsresults;
}
var xmlData = ds.getPointer().serialize();
dataControllerId.registerDelegate(projectId, "defaultCallback", ds, "ondata");
ds.setQueryParam("action", "savedoc");
ds.setQueryParam("fileId", fileid);
ds.setQueryParam("projectId", projId);
ds.setQueryParam("docType", docType);
ds.setQueryParam("xml", xmlData);
ds.doRequest();
]]>
</method>
<method name="isTreeExists" args="treeName">
Debug.write("Calling isTreeExists with "+treeName);
var isTreeFound = false;
var ds = canvas.datasets.dstreefiles;
var ptr = ds.getPointer();
var isPtrValid = ptr.setXPath("/response/files/decisiontrees/file[1]");
if(isPtrValid){
do{
var existTreeName = ptr.getNodeAttribute("name");
var newTreeName = treeName+".xml";
Debug.write("existTreeName:"+existTreeName);
if(newTreeName==existTreeName){
isTreeFound = true;
break;
}
}while(ptr.selectNext());
}
return isTreeFound;
</method>
</class>
</library>
--------------------------------------------------------------------------------------------------------
In launcher.lzx
-------------------

<library>
<include href="../../../modules/components/fileupload.lzx" />
<class name="launcher">
<attribute name="delegate" value="null" />



<fileupload name="myFileUpload">
<method name="onComplete" args="fr"><![CDATA[
//parent.progressBar.setValue(100);
//parent.upload.setAttribute('enabled', false);

// classroot.onuploaded.sendEvent(this);
]]>
</method>

<method name="onProgress" args="fr, bytesLoaded, bytesTotal"><![CDATA[
//parent.progressBar.setValue(bytesLoaded * 100 / bytesTotal);
]]>
</method>

<method name="onSelect" args="fr"><![CDATA[
//parent.txtFile.setText(getName());
//parent.upload.setAttribute('enabled', true);
]]>
</method>
</fileupload>



<method name="fadeDesktop">
tintpnl.setVisible(true);
</method>

<method name="restoreDesktop">
tintpnl.setVisible(false);
</method>

<method name="showDesktop">
<![CDATA[
desktop.setVisible(true);
userbarId.setVisible(true);
loginpnl.setVisible(false);
]]>
</method>

<method name="navContent">
waitDelegate("navContentCallback");
waitcursor.on();
</method>
<method name="navTreeBuilder">
waitDelegate("navTreeBuilderCallback");
waitcursor.on();
</method>

<method name="navTreeBuilderCallback">
visible(contentFrameId, false);
visible(treeFrameId, true);
visible(resultsFrameId, false);
visible(projectPrefsFrameId, false);
visible(scoreFrameId, false);
waitcursor.off();
</method>

<method name="navResultBuilder">
waitDelegate("navResultBuilderCallback");
waitcursor.on();
</method>

<method name="navResultBuilderCallback">
visible(contentFrameId, false);
visible(treeFrameId, false);
visible(resultsFrameId, true);
visible(projectPrefsFrameId, false);
visible(scoreFrameId, false);
waitcursor.off();
</method>
<method name="navScoreBuilder">
waitDelegate("navScoreBuilderCallback");
waitcursor.on();
</method>

<method name="navScoreBuilderCallback">
visible(contentFrameId, false);
visible(treeFrameId, false);
visible(resultsFrameId, false);
visible(projectPrefsFrameId, false);
visible(scoreFrameId, true);
waitcursor.off();
</method>
<method name="navContentCallback">
visible(contentFrameId, true);
visible(treeFrameId, false);
visible(resultsFrameId, false);
visible(scoreFrameId, false);
visible(projectPrefsFrameId, false);
waitcursor.off();
</method>
<method name="navProjectPrefs">
waitDelegate("navProjectPrefsCallback");
waitcursor.on();
</method>

<method name="navProjectPrefsCallback">
visible(contentFrameId, false);
visible(treeFrameId, false);
visible(resultsFrameId, false);
visible(scoreFrameId, false);
visible(projectPrefsFrameId,true);
waitcursor.off();
</method>
<method name="openProject">
open(openProjectId);
projectId.list();
</method>
<method name="listCssfiles" args="pid">
projectId.listCSSFiles(pid);
</method>

<method name="editQAScript">
open(editQAScriptId);
LzFocus.setFocus(scriptView);
var selectedPageId = selectedPage.getText();
var selectedvname = selectedVarNameId.getText();
scriptView.setDatapath("dstree:/response/decisionTree/page[@id = '"+selectedPageId+"']/pageElement[@varName = '"+selectedvname+"']");
</method>

<method name="openSectionPopup">
open(newSectionPopup);
LzFocus.setFocus(newSectionView);
</method>
<method name="createGroup">
open(groupPopupId);
LzFocus.setFocus(groupPopupView);
</method>
<method name="createResultSection">
open(resultSectionPopup);

</method>
<method name="createGridColumn">
open(newGridColumn);
LzFocus.setFocus(gridColView);
</method>
<method name="createResultAnalyticalDoc">
open(resultAnalyticalPopupId);
LzFocus.setFocus(resultAnalyticalpopView);
</method>
<method name="newProject">
open(newProjectId);
LzFocus.setFocus(projView);
</method>
<method name="newContentFile">
open(newContentId);
LzFocus.setFocus(cntFileView);
</method>
<method name="newDesitionTree">
open(decisionTreePopupId);
LzFocus.setFocus(decisionTreePopupView);
</method>
<method name="newPage">
open(newPageId);
LzFocus.setFocus(pageView);
</method>

<method name="newAnswerSet">
open(newAnswerSetId);
LzFocus.setFocus(ansView);
</method>
<method name="newAnswer">
open(newAnswerId);
LzFocus.setFocus(newAns);
var selectedQnId = selectedQuestionId.getText();
var ds = canvas.datasets.dstree;
var ptr = ds.getPointer();
var AnswerSetId = tabAnsElementId.AnsSetId;
ptr.setXPath("/response/decisionTree/question[@id = '"+selectedQnId+"']/columngroup/answerset[@id = '"+AnswerSetId+"']");
var selectedType = ptr.getNodeAttribute("type");
newAns.setAttribute("type", selectedType);
ans_radiogroup.setVisible(true);
if(selectedType=="radiogroup"){
AnsSetType.selectItem("radiogroup");
ans_radiogroup.setVisible(true);
}else if(selectedType=="radiogrid"){
AnsSetType.selectItem("radiogrid");
ans_radiogrid.setVisible(true);
}else if(selectedType=="radioscale"){
AnsSetType.selectItem("radioscale");
ans_radioscale.setVisible(true);
}else if(selectedType=="checkbox"){
AnsSetType.selectItem("checkbox");
ans_checkbox.setVisible(true);
}else if(selectedType=="textbox"){
AnsSetType.selectItem("textbox");
ans_textbox.setVisible(true);
ans_textbox_dec.setVisible(false);
}else if(selectedType=="numberfield"){
AnsSetType.selectItem("numberfield");
ans_textbox.setVisible(true);
ans_textbox_dec.setVisible(true);
}else if(selectedType=="combobox"){
AnsSetType.selectItem("combobox");
ans_combobox.setVisible(true);
}else if(selectedType=="statecombobox"){
AnsSetType.selectItem("statecombobox");
ans_statecombobox.setVisible(true);
}else{
Debug.write("Not yet defined for the type:"+selectedType);
}

</method>
<method name="editPage">
open(editPageId);
LzFocus.setFocus(editPageView);
var selectedPageId = selectedPage.getText();
txtEditPageName.setDatapath("dstree:/response/decisionTree/page[@id = '"+selectedPageId+"']/@varName");
</method>
<method name="editAnswer">
open(editAnswerPopupId);
LzFocus.setFocus(editAnswerView);
var selectedQnId = selectedQuestionId.getText();
var selectedAnswer = ansListId.selectedAnswer;
var selectedAnswerSetId = ansListId.selectedAnswerSet;
var ansVarName = ansListId.selectedAnswerVarName;
var ansId = ansListId.selectedAnswerId;
var dpath = null;
if(ansVarName!=undefined){

dpath="dstree:/response/decisionTree/question[@id = '"+selectedQnId+"']/columngroup/answerset[@id='"+selectedAnswerSetId+"']/answer[@varName='"+ansVarName+"']/text()"
}
if(ansId!=undefined){

dpath="dstree:/response/decisionTree/question[@id = '"+selectedQnId+"']/columngroup/answerset[@id='"+selectedAnswerSetId+"']/answer[@id='"+ansId+"']/text()"
}
txtAnswer.setDatapath(dpath);

</method>
<method name="newContentElement">
open(newContentElementId);
LzFocus.setFocus(cntElementView);
</method>
<method name="newPageElement">
open(newPageElementId);
LzFocus.setFocus(pageElemPopView);
</method>
<!--
<method name="navUsers">
waitDelegate("navUsersCallback");
waitcursor.on();
</method>

<method name="navUsersCallback">
visible(partyListId, true);
partyListId.setAttribute("profile", false);
visible(prodtypeListId, false);
visible(leadMgrId, false);
visible(leadTrackId, false);
visible(weightsMgrId, false);
partyListId.loadOrgs();
//partyListId.loadList();
visible(siteListId, false);
waitcursor.off();
</method>
-->
<method name="waitDelegate" args="callback">
if(this.delegate != null) this.delegate.unregisterAll();
this.delegate = new LzDelegate(this, callback);
LzTimer.addTimer(this.delegate, 300);
</method>

<method name="visible" args="pnl, vis">
if(vis == true) {
if(!pnl.isinited) {
pnl.completeInstantiation();
}
}

if(pnl.isinited) {
pnl.setVisible(vis);
}
</method>

<method name="open" args="pnl">
if(!pnl.isinited) {
pnl.completeInstantiation();
}
if(pnl.isinited) {
this.fadeDesktop();
pnl.bringToFront();
pnl.open();
}
</method>

<method name="openDeleteElementPop" args="elementType,pageId,elementId">
if(elementType=="question"){
open(deleteElementPopId);
}else{
var ds = canvas.datasets.dstree;
var ptr_temp = ds.getPointer();
ptr_temp.setXPath("/response/decisionTree/page[@id = '"+pageId+"']"+"/pageElement[@id = '"+elementId+"']");
ptr_temp.deleteNode();
ds.getPointer();

}
</method>

<method name="deleteElement" args="pageId,elementId,radioChoice">
deleteElementPopId.close();
launcherId.restoreDesktop();
var ds = canvas.datasets.dstree;
var ptr_temp = ds.getPointer();
ptr_temp.setXPath("/response/decisionTree/page[@id = '"+pageId+"']"+"/pageElement[@id = '"+elementId+"']");
var questionRefKey = ptr_temp.getNodeAttribute("refKey");
ptr_temp.deleteNode();
if(radioChoice=="2")
{
ptr_temp = ds.getPointer();
ptr_temp.setXPath("/response/decisionTree/question[@id = '"+questionRefKey+"']");
ptr_temp.deleteNode();
}
ds.getPointer();
</method>



<method name="upload" args="img,path">
<![CDATA[
waitcursor.on();
var ds = canvas.datasets.dsimagefiles;
dataControllerId.registerDelegate(fileuploaddialog Id, "defaultCallback", ds, "ondata");
if(type=="img"){
ds.setQueryParam("action","saveimage");
}
ds.setQueryParam("path", path);
ds.doRequest();
]]>
</method>

<method name="downloadCss" args="downloadid">

var url = "";
url = "/essitebuilder/cmdupload.es?action=download";
Debug.write("url in launcher.lzx-->>>"+downloadid);
//var ds = canvas.datasets.dscssdownload;
//dataControllerId.registerDelegate(projectId, "defaultCallback", ds, "ondata");
//ds.setQueryParam("action","download");
//ds.setQueryParam("downloadid", downloadid);
//ds.doRequest();

myFileUpload.download(url);
</method>

</class>
</library>


--------------------------------------------------------------------------------------------------------

In data.lzx
-----------
<library>
<dataset name="dscontentfilerepo" querytype="post" src="http:/essitebuilder/content.es" />
<dataset name="dsprojectcontentfiles" querytype="post" src="http:/essitebuilder/content.es" />
<dataset name="dscontentrepo" querytype="post" src="http:/essitebuilder/content.es" />
<dataset name="dsproject" querytype="post" src="http:/essitebuilder/project.es" />
<dataset name="dsprojects" querytype="post" src="http:/essitebuilder/project.es" />
<dataset name="dsprojectfiles" querytype="post" src="http:/essitebuilder/project.es" />
<dataset name="dstreefiles" querytype="post" src="http:/essitebuilder/tree.es" />
<dataset name="dstree" querytype="post" src="http:/essitebuilder/tree.es" />
<dataset name="dsprefs" querytype="post" src="http:/essitebuilder/prefs.es" />
<dataset name="dsscore" querytype="post" src="http:/essitebuilder/score.es" />
<dataset name="dsscorefiles" querytype="post" src="http:/essitebuilder/score.es" />
<dataset name="dsresults" querytype="post" src="http:/essitebuilder/score.es" />
<dataset name="dscssfiles" querytype="post" src="http:/essitebuilder/css.es" />
<dataset name="dscssdownload" querytype="post" src="http:/essitebuilder/cmdupload.es" />
<dataset name="dsresults1">
<response>
<report>
<section rows="1" cols="1" name="Report Header">
<tr>
<td>
<![CDATA[
<img src="images/readiness_report_rev.gif" width="700"
height="39" />
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Introduction Header" marker="">
<tr>
<td>
<![CDATA[
<font color="#333333">
<strong>Introduction</strong>
</font>
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Introduction Content" marker="">
<tr>
<td>
<![CDATA[
<font color="#000000">
Thank you for your interest in the Medication Management Improvement System (MMIS) and for completing the Readiness Assessment Tool. Partners in Care has developed this tool in collaboration with the National Council on Aging (NCOA) to:
<br />
<br />
<ul class="ul">
<li class="li">
Collect specific information about your
organization's capacity and willingness to adopt the MMIS
</li>
<li class="li">Analyze the information you provide using six
elements we believe indicate an organization's potential ability to
successfully implement this system</li>
</ul>
<br />
The grid below provides your organization's overall score as well as its score on each of those six elements. The maximum score for overal ratings and for each category is 3.0 for capacity and 3.0 for willingness. Capacity involves the resources
(finances, staff, policies, etc.) that enable or impede an organization's ability to incorporate change, while willingness refers to the organizational culture and staff/management attitudes and experiences that could facilitate or be barriers
to change. Partners in Care hopes to work with all organizations that want to implement the MMIS. Please remember that your Readiness Score is not a reflection of our view regarding your organization's overall mission, quality, or capacity. Rather,
it is an evaluation of your current readiness to adopt the MMIS. Please direct questions about this report to Mira Trufasiu, MSG, Partners in Care Foundation at mtrufasiu@picf.org or (818)837-3775 ext. 112.
</font>
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Organization Header" marker="">
<tr>
<td>
<![CDATA[
<strong>
<font color="#333333" size="2">Organizational Profile</font>
</strong>
]]>
</td>
</tr>
</section>
<section rows="*" cols="3" name="Organization Content" marker="">
<tr>
<td>
<![CDATA[
<strong>Organization Name</strong>
]]>
</td>
<td>
<![CDATA[
{$profileOrganization}
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Program Characteristics Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="*" cols="1" name="Program Characteristics Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Red Flag Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="*" cols="1" name="Red Flag Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Readiness Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Readiness Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Readiness Summary Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="*" cols="1" name="Readiness Summary Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Readiness Scores Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="*" cols="1" name="Readiness Scores Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Readiness Graph Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Readiness Graph Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Results Explanation Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="*" cols="1" name="Results Explanation Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Next Steps Header" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Next Steps Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>
<section rows="1" cols="1" name="Copyright Content" marker="">
<tr>
<td>
<![CDATA[
]]>
</td>
</tr>
</section>

</report>
</response>
</dataset>
<!-- <dataset name="dsprefs">
<response>
<repository sequence="1" name="Required Content Values" description="Content required by the application">
<content id="2" name="surveyTitle" type="variable" description="Title for survey">My Survey</content>
<content id="3" name="infoPanelTitle" type="variable" description="Title for information panel">Information</content>
<content id="4" name="northBorderHeight" type="variable" description="Height for header">171</content>
<content id="5" name="contactHeight" type="variable" description="Height for contact window">300</content>
<content id="6" name="contactWidth" type="variable" description="Width for contact window">400</content>
<content id="7" name="helpHeight" type="variable" description="Height for help window">300</content>
<content id="8" name="helpWidth" type="variable" description="Width for help window">400</content>
<content id="9" name="resourcesHeight" type="variable" description="Height for resources window">400</content>
<content id="10" name="resourcesWidth" type="variable" description="Width for resources window">700</content>
<content id="11" name="invalid_password" type="locale" description="Invalid password error message">Your password was incorrect.</content>
<content id="12" name="invalid_username" type="locale" description="Invalid username error message">Your username was not found.</content>
<content id="13" name="invalid_token" type="locale" description="Expired session error message">Your session has expired. Please login to continue.</content>
<content id="14" name="username_exists" type="locale" description="Username already exists error message">Username already exists. Please try another.</content>
<content id="15" name="contact_title" type="locale" description="Contact window title">Contact Us</content>
<content id="16" name="help_title" type="locale" description="Help window title">Help</content>
<content id="17" name="resources_title" type="locale" description="Resources window title">Resources</content>
<content id="18" name="savedsession_title" type="locale" description="Resources window title">Saved Sessions</content>
</repository>
</response>
</dataset> -->

<dataset name="dsscore1">
<response>
<model name="MMI Score Model" sequence="1"
description="Scoring Implementation for MM_DOI_Tool_Programming_ANALYTICS_ver1_01_05_07Rev .6-26-07.doc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="score.xsd">
<instruction>
<![CDATA[
General Instructions:
 For scaled items (1,2,3,4,5,6), score like GreenHouse Survey
 For response items, score high=3, medium=2, low=1
 Questions asked of all should receive a score
 Questions skipped should not be included in weighted average of characteristics for those who did answer.
]]>
</instruction>
<group id="10" axis="Capacity" score="0" varName="g10" rank="Low"
name="Program Resources">
<section id="100" characteristic="Care Management Model"
score="0" weight="1" varName="s100">
<description>
<![CDATA[
Q2. Which of the following types of model best describes..
a. Medical model
b. Social model
c. Medical-social model
]]>
</description>
<script>
<![CDATA[
if(typeof(ansCMModel) == 'undefined') var ansCMModel = '';
if(ansCMModel=='MM') s100.score = 3.0;
else if(ansCMModel=='SM') s100.score = 1.0;
else if(ansCMModel=='MSM')s100.score = 2.0;
else s100.score = 0.0;
]]>
</script>
</section>
<section id="101" characteristic="Enrollment ratio" score="0"
weight="1" varName="s101">
<description>
<![CDATA[
Calculated Q5b/Q5a to get % average /contacted enrollment.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansContractedEnrollment) == 'undefined') var ansContractedEnrollment = '1';
if(typeof(ansAvgEnrollment) == 'undefined') var ansAvgEnrollment = '0';
if(typeof(ansNStaff) == 'undefined') var ansNStaff = '1';
if(typeof(percentageCMComputer) == 'undefined') var percentageCMComputer = '0';

var enrollmentRatio = ansAvgEnrollment/ansContractedEnrollment;
var avgCaseloadPerCM = parseInt(ansContractedEnrollment/ansNStaff);

if(enrollmentRatio>=0.95) s101.score = 3.0;
else if(enrollmentRatio>=0.8) s101.score = 2.0;
else s101.score = 1.0;

enrollmentRatio = (enrollmentRatio*100).toFixed(1);
]]>
</script>
</section>
<section id="102" characteristic="Resource Barriers Staff time"
score="0" weight="2" varName="s102">
<description>
<![CDATA[
Q21. What is the likelihood that … will be an issue
c. Amount of staff time required
]]>
</description>
<script>
<![CDATA[
if(typeof(ansLackTime) == 'undefined') var ansLackTime = '';
if(ansLackTime == 1 || ansLackTime == 2) s102.score = 3.0;
else if(ansLackTime == 3 || ansLackTime == 4) s102.score = 2.0;
else if(ansLackTime == 5 || ansLackTime == 6) s102.score = 1.0;
else s102.score = 0.0;
]]>
</script>
</section>
<section id="103"
characteristic="Resource Barriers Financial Capacity" score="0"
weight="2" varName="s103">
<description>
<![CDATA[
Q21. What is the likelihood that … will be an issue
e. Strained financial resources
]]>
</description>
<script>
<![CDATA[
if(typeof(ansFinResources) == 'undefined') var ansFinResources = '';
if(ansFinResources == 1 || ansFinResources == 2) s103.score = 3.0;
else if(ansFinResources == 3 || ansFinResources == 4) s103.score = 2.0;
else if(ansFinResources == 5 || ansFinResources == 6) s103.score = 1.0;
else s103.score = 0.0;
]]>
</script>
</section>
</group>
<group id="20" axis="Willingness" score="0" varName="g20" rank="Low"
name="Program Resources">
<section id="200" characteristic="Flexibility" score="0"
weight="1" varName="s200">
<description>
<![CDATA[
Q17e. Our existing systems and procedures are flexible
enough to incorporate MMIS.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansFlexSystems) == 'undefined') var ansFlexSystems = '';
if(ansFlexSystems == 5 || ansFlexSystems == 6) s200.score = 3.0;
else if(ansFlexSystems == 3 || ansFlexSystems == 4) s200.score = 2.0;
else if(ansFlexSystems == 1 || ansFlexSystems == 2) s200.score = 1.0;
else s200.score = 0.0;
]]>
</script>
</section>
<section id="201" characteristic="Complexity" score="0"
weight="1" varName="s201">
<description>
<![CDATA[
Q17f. Relative to other new programs we have implemented
in the past, the MMIS would be more complex.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansMoreComplex) == 'undefined') var ansMoreComplex = '';
if(ansMoreComplex == 1 || ansMoreComplex == 2) s201.score = 3.0;
else if(ansMoreComplex == 3 || ansMoreComplex == 4) s201.score = 2.0;
else if(ansMoreComplex == 5 || ansMoreComplex == 6) s201.score = 1.0;
else s201.score = 0.0;
]]>
</script>
</section>
<section id="202" characteristic="Current strains on capacity"
score="0" weight="1" varName="s202">
<description>
<![CDATA[
Q14a – c. Currently undergoing changes
]]>
</description>
<script>
<![CDATA[
if(typeof(ansChangeCareMgr)) var ansChangeCareMgr = '';
if(typeof(ansChangeNewSystem)) var ansChangeNewSystem = '';
if(typeof(ansChangeNewTech)) var ansChangeNewTech = '';
if(ansChangeCareMgr > 1 && ansChangeNewSystem > 1 && ansChangeNewTech > 1)s202.score = 3.0;
else if(ansChangeCareMgr > 1 && ansChangeNewSystem > 1) s202.score = 2.0;
else if(ansChangeNewSystem > 1 && ansChangeNewTech > 1) s202.score = 2.0;
else if(ansChangeCareMgr > 1 && ansChangeNewTech > 1) s202.score = 2.0;
else s202.score = 1.0;
]]>
</script>
</section>
</group>
<group id="30" axis="Capacity" score="0" varName="g30" rank="Low"
name="Organizational Culture">
<section id="300" characteristic="Decision Making" score="0"
weight="1" varName="s300">
<description>
<![CDATA[
Q18. Which would be included in the decision making... (Select all that apply.)
a. Board of directors
b. Executive staff
c. Supervisors
d. Care Managers
]]>
</description>
<script>
<![CDATA[
if(typeof(ansBOD)) var ansBOD = '';
if(typeof(ansExecStaff)) var ansExecStaff = '';
if(typeof(ansSuperTeam)) var ansSuperTeam = '';
if(typeof(ansCareMgrs)) var ansCareMgrs = '';
if(ansExecStaff == 'on' && ansSuperTeam == 'on' && ansCareMgrs == 'on') s300.score = 3.0;
else if(ansSuperTeam == 'on' && ansCareMgrs == 'on') s300.score = 2.0;
else s300.score = 1.0;
]]>
</script>
</section>
<section id="301" characteristic="Commitment" score="0"
weight="1" varName="s301">
<description>
<![CDATA[
Q19a. Ex. staff
a. Would champion
b. Would support
c. Would need convincing
d. Would oppose
e. Would have mixed reactions
]]>
</description>
<script>
<![CDATA[
if(typeof(ansCommitment_q19a) == 'undefined') var ansCommitment_q19a = '';
if(ansCommitment_q19a == 'champion' || ansCommitment_q19a == 'support') s301.score = 3.0;
else if(ansCommitment_q19a == 'convince' || ansCommitment_q19a == 'mixed') s301.score = 2.0;
else if(ansCommitment_q19a == 'oppose' ) s301.score = 1.0;
else s301.score = 0;
]]>
</script>
</section>
<section id="302" characteristic="Commitment" score="0"
weight="2" varName="s302">
<description>
<![CDATA[
Q19b. Management staff
a. Would champion
b. Would support
c. Would need convincing
d. Would oppose
e. Would have mixed reactions
]]>
</description>
<script>
<![CDATA[
if(typeof(ansCommitment_q19b) == 'undefined') var ansCommitment_q19b = '';
if(ansCommitment_q19b == 'champion') s302.score = 3.0;
else if(ansCommitment_q19b == 'convince' || ansCommitment_q19b == 'mixed' || ansCommitment_q19b == 'support') s302.score = 2.0;
else if(ansCommitment_q19b == 'oppose') s302.score = 1.0;
else s302.score = 0.0;
]]>
</script>
</section>
<section id="303" characteristic="Commitment" score="0"
weight="2" varName="s303">
<description>
<![CDATA[
Q19c. Field staff
a. Would champion
b. Would support
c. Would need convincing
d. Would oppose
e. Would have mixed reactions
]]>
</description>
<script>
<![CDATA[
if(typeof(ansCommitment_q19c) == 'undefined') var ansCommitment_q19c = '';
if(ansCommitment_q19c == 'champion') s303.score = 3.0;
else if(ansCommitment_q19c == 'convince' || ansCommitment_q19c == 'mixed' || ansCommitment_q19c == 'support') s303.score = 2.0;
else if(ansCommitment_q19c == 'oppose') s303.score = 1.0;
else s303.score = 0.0;
]]>
</script>
</section>
<section id="304"
characteristic="Capacity Barriers Agency Priorities" score="0"
weight="1" varName="s304">
<description>
<![CDATA[
Q21. What is the likelihood that … will be an issue
a. other agency priorities
]]>
</description>
<script>
<![CDATA[
if(typeof(ansOtherPriorities) == 'undefined') var ansOtherPriorities = '';
if(ansOtherPriorities == 1 || ansOtherPriorities == 2) s304.score = 3.0;
else if(ansOtherPriorities == 3 || ansOtherPriorities == 4) s304.score = 2.0;
else if(ansOtherPriorities == 5 || ansOtherPriorities == 6) s304.score = 1.0;
else s304.score = 0.0;
]]>
</script>
</section>
</group>
<group id="40" axis="Willingness" score="0" varName="g40" rank="Low"
name="Organizational Culture">
<section id="400" characteristic="Compatability" score="0"
weight="1" varName="s400">
<description>
<![CDATA[
Q17g. Monitoring the health and safety of our
clients is a critical part of the mission of our org.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansMonitorHealth) == 'undefined') var ansMonitorHealth = '';
if(ansMonitorHealth == 5 || ansMonitorHealth == 6) s400.score = 3.0;
else if(ansMonitorHealth == 3 || ansMonitorHealth == 4) s400.score = 2.0;
else if(ansMonitorHealth == 1 || ansMonitorHealth == 2) s400.score = 1.0;
else s400.score = 0.0;
]]>
</script>
</section>
<section id="401"
characteristic="Commitment Barriers: Commitment of care mngr. or supervisory staff"
score="0" weight="1" varName="s401">
<description>
<![CDATA[
Q21. What is the likelihood that … will be an issue
b. insufficient commitment by care managers or supervisors to
implement the system
]]>
</description>
<script>
<![CDATA[
if(typeof(ansLackCommitment) == 'undefined') var ansLackCommitment = '';
if(ansLackCommitment == 1 || ansLackCommitment == 2) s401.score = 3.0;
if(ansLackCommitment == 3 || ansLackCommitment == 4) s401.score = 2.0;
if(ansLackCommitment == 5 || ansLackCommitment == 6) s401.score = 1.0;
]]>
</script>
</section>
<section id="402" characteristic="Felt Need" score="0"
weight="1" varName="s402">
<description>
<![CDATA[
Q17l. The people we serve would benefit significantly if their meds were screened regularly for potential errors ...
]]>
</description>
<script>
<![CDATA[
if(typeof(ansGoodScreen) == 'undefined') var ansGoodScreen = '';
if(ansGoodScreen == 5 || ansGoodScreen == 6) s402.score = 3.0;
else if(ansGoodScreen == 3 || ansGoodScreen == 4) s402.score = 2.0;
else if(ansGoodScreen == 1 || ansGoodScreen == 2) s402.score = 1.0;
else s402.score = 0.0;
]]>
</script>
</section>
<section id="403" characteristic="Motivation" score="0"
weight="1" varName="s403">
<description>
<![CDATA[
Q17j. The benefits of the MMIS for our clients would outweigh the cost of adopting and maintaining it.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansOutweigh) == 'undefined') var ansOutweigh = '';
if(ansOutweigh == 5 || ansOutweigh == 6) s403.score = 3.0;
else if(ansOutweigh == 3 || ansOutweigh == 4) s403.score = 2.0;
else if(ansOutweigh == 1 || ansOutweigh == 2) s403.score = 1.0;
else s403.score = 0.0;
]]>
</script>
</section>
</group>
<group id="50" axis="Capacity" score="0" varName="g50" rank="Low"
name="Innovativeness">
<section id="500" characteristic="Adopter Status" score="0"
weight="1" varName="s500">
<description>
<![CDATA[
Q13
a. INNOVATORS: We are often the first to adopt…
b. EARLY ADOPTERS: We are early adopters …
c. EARLY MAJORITY: We will adopt …after …established …
d. LATE MAJORITY: We usually wait to adopt …
e. LAST TO ADOPT: We tend to be the last …to adopt …
]]>
</description>
<script>
<![CDATA[
if(typeof(ansCompare) == 'undefined') var ansCompare = '';
if(ansCompare == 1 || ansCompare == 2) s500.score = 3.0;
else if(ansCompare == 3) s500.score = 2.0;
else if(ansCompare == 4 || ansCompare == 5) s500.score = 1.0;
else s500.score = 0.0;
]]>
</script>
</section>
<section id="501" characteristic="Previous experience" score="0"
weight="1" varName="s501">
<description>
<![CDATA[
Q14. Has your agency …
a. expanded scope
b. adopted new model or system
c. implemented new technology
]]>
</description>
<script>
<![CDATA[
if(typeof(ansChangeCareMgr) == 'undefined') var ansChangeCareMgr = '';
if(typeof(ansChangeNewSystem) == 'undefined') var ansChangeNewSystem = '';
if(typeof(ansChangeNewTech) == 'undefined') var ansChangeNewTech = '';
if(ansChangeCareMgr == 2 && ansChangeNewSystem == 2) s501.score = 3.0;
else if(ansChangeCareMgr == 2 && ansChangeNewTech == 2) s501.score = 3.0;
else if(ansChangeNewSystem == 2 && ansChangeNewTech == 2) s501.score = 3.0;
else if(ansChangeCareMgr == 2 || ansChangeNewTech == 2 || ansChangeNewSystem == 2) s501.score = 2.0;
else if(ansChangeCareMgr != 2 && ansChangeNewTech != 2 && ansChangeNewSystem != 2) s501.score = 1.0;
else s501.score = 0.0;
]]>
</script>
</section>
<section id="502" characteristic="Decision" score="0" weight="1"
varName="s502">
<description>
<![CDATA[
Q17c - Decision
]]>
</description>
<script>
<![CDATA[
if(typeof(ansImproveNow) == 'undefined') var ansImproveNow = '';
if(ansImproveNow == 5 || ansImproveNow == 6) s502.score = 3.0;
else if(ansImproveNow == 3 || ansImproveNow == 4) s502.score = 2.0;
else if(ansImproveNow == 2 || ansImproveNow == 1) s502.score = 1.0;
else s502.score = 0.0;
]]>
</script>
</section>
</group>
<group id="60" axis="Willingness" score="0" varName="g60" rank="Low"
name="Innovativeness">
<section id="600" characteristic="Decision Status" score="0"
weight="1" varName="s600">
<description>
<![CDATA[
Q17.
a. Knowledge
b. Persuasion
]]>
</description>
<script>
<![CDATA[
if(typeof(ansUnderstandMMS) == 'undefined') var ansUnderstandMMS = '';
if(typeof(ansShouldImplement) == 'undefined') var ansShouldImplement = '';
if(ansShouldImplement == 1 && ansUnderstandMMS == 1) s600.score = 1.0;
else if(ansShouldImplement == 1 && ansUnderstandMMS == 2) s600.score = 1.0;
else if(ansShouldImplement == 1 && ansUnderstandMMS == 3) s600.score = 1.0;
else if(ansShouldImplement == 1 && ansUnderstandMMS == 4) s600.score = 1.0;
else if(ansShouldImplement == 1 && ansUnderstandMMS == 5) s600.score = 1.0;
else if(ansShouldImplement == 1 && ansUnderstandMMS == 6) s600.score = 1.0;
else if(ansShouldImplement == 2 && ansUnderstandMMS == 1) s600.score = 1.0;
else if(ansShouldImplement == 2 && ansUnderstandMMS == 2) s600.score = 1.0;
else if(ansShouldImplement == 2 && ansUnderstandMMS == 3) s600.score = 1.0;
else if(ansShouldImplement == 2 && ansUnderstandMMS == 4) s600.score = 1.0;
else if(ansShouldImplement == 2 && ansUnderstandMMS == 5) s600.score = 1.0;
else if(ansShouldImplement == 2 && ansUnderstandMMS == 6) s600.score = 1.0;
else if(ansShouldImplement == 3 && ansUnderstandMMS == 1) s600.score = 2.0;
else if(ansShouldImplement == 3 && ansUnderstandMMS == 2) s600.score = 2.0;
else if(ansShouldImplement == 3 && ansUnderstandMMS == 3) s600.score = 2.0;
else if(ansShouldImplement == 3 && ansUnderstandMMS == 4) s600.score = 2.0;
else if(ansShouldImplement == 3 && ansUnderstandMMS == 5) s600.score = 2.0;
else if(ansShouldImplement == 3 && ansUnderstandMMS == 6) s600.score = 2.0;
else if(ansShouldImplement == 4 && ansUnderstandMMS == 1) s600.score = 2.0;
else if(ansShouldImplement == 4 && ansUnderstandMMS == 2) s600.score = 2.0;
else if(ansShouldImplement == 4 && ansUnderstandMMS == 3) s600.score = 2.0;
else if(ansShouldImplement == 4 && ansUnderstandMMS == 4) s600.score = 2.0;
else if(ansShouldImplement == 4 && ansUnderstandMMS == 5) s600.score = 2.0;
else if(ansShouldImplement == 4 && ansUnderstandMMS == 6) s600.score = 2.0;
else if(ansShouldImplement == 5 && ansUnderstandMMS == 1) s600.score = 2.0;
else if(ansShouldImplement == 5 && ansUnderstandMMS == 2) s600.score = 2.0;
else if(ansShouldImplement == 5 && ansUnderstandMMS == 3) s600.score = 3.0;
else if(ansShouldImplement == 5 && ansUnderstandMMS == 4) s600.score = 3.0;
else if(ansShouldImplement == 5 && ansUnderstandMMS == 5) s600.score = 3.0;
else if(ansShouldImplement == 5 && ansUnderstandMMS == 6) s600.score = 3.0;
else if(ansShouldImplement == 6 && ansUnderstandMMS == 1) s600.score = 2.0;
else if(ansShouldImplement == 6 && ansUnderstandMMS == 2) s600.score = 2.0;
else if(ansShouldImplement == 6 && ansUnderstandMMS == 3) s600.score = 3.0;
else if(ansShouldImplement == 6 && ansUnderstandMMS == 4) s600.score = 3.0;
else if(ansShouldImplement == 6 && ansUnderstandMMS == 5) s600.score = 3.0;
else if(ansShouldImplement == 6 && ansUnderstandMMS == 6) s600.score = 3.0;
else s600.score = 0.0;
]]>
</script>
</section>
<section id="601" characteristic="Observability" score="0"
weight="1" varName="s601">
<description>
<![CDATA[
Q17h. We have seen others successfully implement programs to decrease medication errors...
]]>
</description>
<script>
<![CDATA[
if(typeof(ansLessErrors) == 'undefined') var ansLessErrors = '';
if(ansLessErrors == 5 || ansLessErrors == 6) s601.score = 3.0;
else if(ansLessErrors == 3 || ansLessErrors == 4) s601.score = 2.0;
else if(ansLessErrors == 1 || ansLessErrors == 2) s601.score = 1.0;
else s601.score = 0.0;
]]>
</script>
</section>
</group>
<group id="70" axis="Capacity" score="0" varName="g70" rank="Low"
name="Staffing">
<section id="700" characteristic="Turnover" score="0" weight="1"
varName="s700">
<description>
<![CDATA[
Q9b. Would you say that [Q9a]% is a … level of turnover?
a. High
b. Medium
c. Low
]]>
</description>
<script>
<![CDATA[
if(typeof(ansTurnover) == 'undefined') var ansTurnover = '';
if(ansTurnover == 'low') s700.score = 3.0;
else if(ansTurnover == 'med') s700.score = 2.0;
else if(ansTurnover == 'high') s700.score = 1.0;
else s700.score = 0.0;
]]>
</script>
</section>
<section id="701"
characteristic="Ratio of supv. to care managers" score="0" weight="1"
varName="s701">
<description>
<![CDATA[
[Calculated ratio of 7a/7b]
]]>
</description>
<script>
<![CDATA[
if(typeof(ansNSuper) == 'undefined') var ansNSuper = 1;
if(typeof(ansNStaff) == 'undefined') var ansNStaff = 0;
var ratioStaffToSuper = ansNStaff/ansNSuper;
ratioStaffToSuper = parseInt(ratioStaffToSuper);
if(ansNStaff <= 8*ansNSuper) s701.score = 3.0;
else if(ansNStaff <= 11*ansNSuper) s701.score = 2.0;
else if(ansNStaff >11*ansNSuper) s701.score = 1.0;
else s701.score = 0.0;
]]>
</script>
</section>
<section id="702" characteristic="Credentials" score="0"
weight="1" varName="s702">
<description>
<![CDATA[
Q8a. How many care managers have the following credentials?
a. RN
b. LVN, LPN
c. MSW
d. Other Masters
e. Other Care Managers
]]>
</description>
<script>
<![CDATA[
if(typeof(ansNRN) == 'undefined') var ansNRN = '';
if(typeof(ansNLVN) == 'undefined') var ansNLVN = '';
if(typeof(ansNMSW) == 'undefined') var ansNMSW = '';
if(ansNRN >= 1 && ansNMSW >= 1) s702.score = 3.0;
else if(ansNRN >=1 && ansNLVN >= 1) s702.score = 2.0;
else s702.score = 1.0;
]]>
</script>
</section>
<section id="703" characteristic="Caseload ratio" score="0"
weight="1" varName="s703">
<description>
<![CDATA[
Q6 (on a 6-pt scale)
a. Enough care managers
b. Enough nurses
c. Staffing ratio compares favorably
]]>
</description>
<script>
<![CDATA[
if(typeof(ansEnoughCareMgr) == 'undefined') var ansEnoughCareMgr = '';
if(typeof(ansEnoughNurse) == 'undefined') var ansEnoughNurse = '';
if(typeof(ansEnoughRatio) == 'undefined') var ansEnoughRatio = '';
var temp703 = (ansEnoughCareMgr + ansEnoughNurse + ansEnoughRatio)/3;
if(temp703 == 5 || temp703 == 6) s703.score = 3.0;
else if(temp703 == 3 || temp703 == 4) s703.score = 2.0;
else if(temp703 == 5 || temp703 == 6) s703.score = 1.0;
else s703.score = 0.0;
]]>
</script>
</section>
<section id="704" characteristic="Client Contact" score="0"
weight="1" varName="s704">
<description>
<![CDATA[
Q10. …agency’s policy/standard for max time between client contacts…?
a.Monthly
b.Quarterly
c.Semi-annually
d.Yearly
e.No standard
]]>
</description>
<script>
<![CDATA[
if(typeof(ansEnoughRatio) == 'undefined') var ansEnoughRatio = '';
if(ansInHomeVisits == 'm') s704.score = 3.0;
else if(ansInHomeVisits == 'q' || ansInHomeVisits == 's') s704.score = 2.0;
else if(ansInHomeVisits == 'y' || ansInHomeVisits == 'n' ) s704.score = 1.0;
else s704.score = 0.0;
]]>
</script>
</section>
<section id="705" characteristic="Scope of Work Barrier"
score="0" weight="1" varName="s705">
<description>
<![CDATA[
Q20. What is the likelihood that … will be an issue
d. Care managers’ scope of work does not currently
include these responsibilities.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansNoResponsibility) == 'undefined') var ansNoResponsibility = '';
if(ansNoResponsibility == 1 || ansNoResponsibility == 2) s705.score = 3.0;
else if(ansNoResponsibility == 3 || ansNoResponsibility == 4) s705.score = 2.0;
else if(ansNoResponsibility == 5 || ansNoResponsibility == 6) s705.score = 1.0;
else s705.score = 0.0;
]]>
</script>
</section>
<section id="706" characteristic="Scope of Work Barrier"
score="0" weight="1" varName="s706">
<description>
<![CDATA[
Q17d. Care managers currently follow through when they find potential medication problems.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansFollowThru) == 'undefined') var ansFollowThru = '';
if(ansFollowThru == 5 || ansFollowThru == 5) s706.score = 3.0;
else if(ansFollowThru == 3 || ansFollowThru == 4) s706.score = 2.0;
else if(ansFollowThru == 1 || ansFollowThru == 2) s706.score = 1.0;
else s706.score = 0.0;
]]>
</script>
</section>
</group>
<group id="80" axis="Willingness" score="0" varName="g80" rank="Low"
name="Staffing">
<section id="800" characteristic="Voluntariness" score="0"
weight="1" varName="s800">
<description>
<![CDATA[
Q17i. Dealing with medication problems is not part of a care manager’s job description.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansNotJob) == 'undefined') var ansNotJob = '';
if(ansNotJob == 1 || ansNotJob == 2) s800.score = 3.0;
else if(ansNotJob == 3 || ansNotJob == 4) s800.score = 2.0;
else if(ansNotJob == 5 || ansNotJob == 6) s800.score = 1.0;
else s800.score = 0.0;
]]>
</script>
</section>
<section id="801" characteristic="Altruism" score="0" weight="1"
varName="s801">
<description>
<![CDATA[
Q16. Rate your …current staff of care managers
b. …priority of staff is the welfare of their clients.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansWelfare) == 'undefined') var ansWelfare = '';
if(ansWelfare == 5 || ansWelfare == 6) s801.score = 3.0;
else if(ansWelfare == 3 || ansWelfare == 4) s801.score = 2.0;
else if(ansWelfare == 1 || ansWelfare == 2) s801.score = 1.0;
else s801.score = 0.0;
]]>
</script>
</section>
<section id="802" characteristic="Altruism" score="0" weight="1"
varName="s802">
<description>
<![CDATA[
Q16. Rate your …current staff of care managers
e. express concern re their clients' ability to manage their meds
]]>
</description>
<script>
<![CDATA[
if(typeof(ansDrugMgmtConcern) == 'undefined') var ansDrugMgmtConcern = '';
if(ansDrugMgmtConcern == 5 || ansDrugMgmtConcern == 6) s802.score = 3.0;
else if(ansDrugMgmtConcern == 3 || ansDrugMgmtConcern == 4) s802.score = 2.0;
else if(ansDrugMgmtConcern == 1 || ansDrugMgmtConcern == 2) s802.score = 1.0;
else s802.score = 0.0;
]]>
</script>
</section>
<section id="803" characteristic="Degree of Compliance"
score="0" weight="1" varName="s803">
<description>
<![CDATA[
Q16. Rate your …current staff of care managers
a. resistant to adding to their current scope of work…
]]>
</description>
<script>
<![CDATA[
if(typeof(ansNoNewWork) == 'undefined') var ansNoNewWork = '';
if(ansNoNewWork == 1 || ansNoNewWork == 2) s803.score = 3.0;
else if(ansNoNewWork == 3 || ansNoNewWork == 4) s803.score = 2.0;
else if(ansNoNewWork == 5 || ansNoNewWork == 6) s803.score = 1.0;
else s803.score = 0.0;
]]>
</script>
</section>
<section id="804" characteristic="Degree of Compliance"
score="0" weight="1" varName="s804">
<description>
<![CDATA[
Q16. Rate your …current staff of care managers
f. open to learning new systems that will benefit their clients.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansOpenToNew) == 'undefined') var ansOpenToNew = '';
if(ansOpenToNew == 5 || ansOpenToNew == 6) s804.score = 3.0;
else if(ansOpenToNew == 3 || ansOpenToNew == 4) s804.score = 2.0;
else if(ansOpenToNew == 1 || ansOpenToNew == 2) s804.score = 1.0;
else s804.score = 0.0;
]]>
</script>
</section>
<section id="805" characteristic="Perception of Workload"
score="0" weight="1" varName="s805">
<description>
<![CDATA[
Q16. Rate your …current staff of care managers
c. complain about paperwork and data collection
]]>
</description>
<script>
<![CDATA[
if(typeof(ansComplain) == 'undefined') var ansComplain = '';
if(ansComplain == 1 || ansComplain == 2) s805.score = 3.0;
else if(ansComplain == 3 || ansComplain == 4) s805.score = 2.0;
else if(ansComplain == 5 || ansComplain == 6) s805.score = 1.0;
else s805.score = 0.0;
]]>
</script>
</section>
<section id="806" characteristic="Perception of Workload"
score="0" weight="1" varName="s806">
<description>
<![CDATA[
Q16. Rate your …current staff of care managers
d. report being overburdened
]]>
</description>
<script>
<![CDATA[
if(typeof(ansTooMuchWork) == 'undefined') var ansTooMuchWork = '';
if(ansTooMuchWork == 1 || ansTooMuchWork == 2) s806.score = 3.0;
else if(ansTooMuchWork == 3 || ansTooMuchWork == 4) s806.score = 2.0;
else if(ansTooMuchWork == 5 || ansTooMuchWork == 5) s806.score = 1.0;
else s806.score = 0.0;
]]>
</script>
</section>
</group>
<group id="90" axis="Capacity" score="0" varName="g90" rank="Low"
name="Client Records System">
<section id="900" characteristic="Current documentation of meds"
score="0" weight="1" varName="s900">
<description>
<![CDATA[
Q12. How doc client's med info:
a. paper-based system
b. computerized database
c. Med info not collected
]]>
</description>
<script>
<![CDATA[
if(typeof(ansDocMedInfo) == 'undefined') var ansDocMedInfo = '';
if(ansDocMedInfo == 'C') s900.score = 3.0;
else if(ansDocMedInfo == 'P') s900.score = 2.0;
else if(ansDocMedInfo == 'N') s900.score = 1.0;
else s900.score = 0.0;
]]>
</script>
</section>
<section id="901"
characteristic="Vital signs collection or access" score="0"
weight="1" varName="s901">
<description>
<![CDATA[
Q11. Are vital signs avail…?
a. Yes
b. No
]]>
</description>
<script>
<![CDATA[
if(typeof(ansVitalSigns) == 'undefined') var ansVitalSigns = '';
if(ansVitalSigns == 'Y') s901.score = 3.0;
else if(ansVitalSigns == 'N') s901.score = 1.0;
else s901.score = 0.0;
]]>
</script>
</section>
<section id="902"
characteristic="Computerization of client assessment" score="0"
weight="1" varName="s902">
<description>
<![CDATA[
Q4 Is your current client assessment system computerized?
a. Yes
b. No ( do NOT terminate here)
c. No but will be computerized soon.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansComputerized) == 'undefined') var ansComputerized = '';
if(ansComputerized == 'Y') s902.score = 3.0;
else if(ansComputerized == 'SOON') s902.score = 2.0;
else if(ansComputerized == 'N') s902.score = 1.0;
else s902.score = 0.0;
]]>
</script>
</section>
</group>
<group id="100" axis="Willingness" score="0" varName="g100"
rank="Low" name="Client Records System">
<section id="1000" characteristic="Collect Medication inventory"
score="0" weight="1" varName="s1000">
<description>
<![CDATA[
Q21. Likelihood to comply with MMIS requirements…
a. collect med inventory…
]]>
</description>
<script>
<![CDATA[
if(typeof(ansEnsureData) == 'undefined') var ansEnsureData = '';
if(ansEnsureData == 5 || ansEnsureData == 6) s1000.score = 3.0;
else if(ansEnsureData == 3 || ansEnsureData == 4) s1000.score = 2.0;
else if(ansEnsureData == 1 || ansEnsureData == 2) s1000.score = 1.0;
else s1000.score = 0.0;
]]>
</script>
</section>
<section id="1001"
characteristic="Integrate or contract for software system" score="0"
weight="1" varName="s1001">
<description>
<![CDATA[
Q21. Likelihood to comply with MMIS requirements…
b. Integrate protocols into computerized system OR contract for software use…
]]>
</description>
<script>
<![CDATA[
if(typeof(ansIntegrateProtocols) == 'undefined') var ansIntegrateProtocols = '';
if(ansIntegrateProtocols == 5 || ansIntegrateProtocols == 6) s1001.score = 3.0;
else if(ansIntegrateProtocols == 3 || ansIntegrateProtocols == 4) s1001.score = 2.0;
else if(ansIntegrateProtocols == 1 || ansIntegrateProtocols == 2) s1001.score = 1.0;
else s1001.score = 0.0;
]]>
</script>
</section>
<section id="1002" characteristic="Document process" score="0"
weight="1" varName="s1002">
<description>
<![CDATA[
Q21. Likelihood to comply with MMIS requirements
e. Document process of med management and intervention.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansDocProcess) == 'undefined') var ansDocProcess = '';
if(ansDocProcess == 5 || ansDocProcess == 6) s1002.score = 3.0;
else if(ansDocProcess == 3 || ansDocProcess == 4) s1002.score = 2.0;
else if(ansDocProcess == 1 || ansDocProcess == 2) s1002.score = 1.0;
else s1002.score = 0.0;
]]>
</script>
</section>
</group>
<group id="110" axis="Capacity" score="0" varName="g110" rank="Low"
name="Contact &amp; Follow-up">
<section id="1100" characteristic="Current relationship"
score="0" weight="1" varName="s1100">
<description>
<![CDATA[
Q22a. currently have a relationship with a med consultant ?
a. Yes, formal contract
b. Yes, informal consulting relationship
c. No, relationship currently
]]>
</description>
<script>
<![CDATA[
if(typeof(ansRelationMedConsultant) == 'undefined') var ansRelationMedConsultant = '';
if(ansRelationMedConsultant == 'contract') s1100.score = 3.0;
else if(ansRelationMedConsultant == 'informal') s1100.score = 2.0;
else if(ansRelationMedConsultant == 'none') s1100.score = 1.0;
else s1100.score = 0.0;
]]>
</script>
</section>
<section id="1101" characteristic="Current relationship"
score="0" weight="1" varName="s1101">
<description>
<![CDATA[
Q21f. Paying for pharmacist’s (or other medication specialist’s) advice and consultation.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansPayAdvice) == 'undefined') var ansPayAdvice = '';
if(ansPayAdvice == 1 || ansPayAdvice == 2) s1101.score = 3.0;
else if(ansPayAdvice == 3 || ansPayAdvice == 4) s1101.score = 2.0;
else if(ansPayAdvice == 5 || ansPayAdvice == 6) s1101.score = 1.0;
else s1101.score = 0.0;
]]>
</script>
</section>
</group>
<group id="120" axis="Willingness" score="0" varName="g120"
rank="Low" name="Contact &amp; Follow-up">
<section id="1200"
characteristic="Willing to access medication consultant" score="0"
weight="1" varName="s1200">
<description>
<![CDATA[
[ASK Q22b IF Q22a=c]
Q22b. Are you willing to enter into a relationship with a medication consultant?
a. Yes
b. No [Red Flag]
c. Don’t know/Unsure
]]>
</description>
<script>
<![CDATA[
if(typeof(ansEnterRelMedCons) == 'undefined') var ansEnterRelMedCons = '';
if(ansEnterRelMedCons == 'Y') s1200.score = 3.0;
else if(ansEnterRelMedCons == 'DK') s1200.score = 2.0;
else if(ansEnterRelMedCons == 'N') s1200.score = 1.0;
else s1200.score = 0.0;
]]>
</script>
</section>
<section id="1201"
characteristic="Consult with pharmacist or other med specialist"
score="0" weight="1" varName="s1201">
<description>
<![CDATA[
Q21. Likelihood to comply with MMIS requirements…
c. consult with pharmacist or other med specialist
]]>
</description>
<script>
<![CDATA[
if(typeof(ansConsultSpecialist) == 'undefined') var ansConsultSpecialist = '';
if(ansConsultSpecialist == 5 || ansConsultSpecialist == 6) s1201.score = 3.0;
else if(ansConsultSpecialist == 3 || ansConsultSpecialist == 4) s1201.score = 2.0;
else if(ansConsultSpecialist == 1 || ansConsultSpecialist == 2) s1201.score = 1.0;
else s1201.score = 0.0;
]]>
</script>
</section>
<section id="1202" characteristic="Follow-up" score="0"
weight="1" varName="s1202">
<description>
<![CDATA[
Q22. Likelihood to comply with MMIS requirements…
d. Follow-up confirmed med problems with physician contact, by letter or telephone.
]]>
</description>
<script>
<![CDATA[
if(typeof(ansFollowupMedProblems) == 'undefined') var ansFollowupMedProblems = '';
if(ansFollowupMedProblems == 5 || ansFollowupMedProblems == 6) s1202.score = 3.0;
else if(ansFollowupMedProblems == 3 || ansFollowupMedProblems == 4) s1202.score = 2.0;
else if(ansFollowupMedProblems == 1 || ansFollowupMedProblems == 2) s1202.score = 1.0;
else s1202.score = 0.0;
]]>
</script>
</section>
</group>
</model>
</response>
</dataset>
</library>

--------------------------------------------------------------------------------------------------------
In fileupload.lzx
--------------------
<library>
<class name="fileupload">
<method event="oninit" args="invoker"><![CDATA[
fr = new flash.net.FileReference();
fr.addListener(invoker);
]]>
</method>

<method name="browse"><![CDATA[
fr.browse();
]]>
</method>

<method name="getName"><![CDATA[
return fr.name;
]]>
</method>

<method name="getType"><![CDATA[
return fr.type;
]]>
</method>

<method name="upload" args="url"><![CDATA[
fr.upload(url);
]]>
</method>


<method name="download" args="url">
<![CDATA[
Debug.write("url in filedownload.lzx--->>>"+url);

fr.download(url);
]]>
</method>


</class>
</library>

--------------------------------------------------------------------------------------------------------


when i click the download button that releated .css file has to download

this is the my target.

***** URGENT

caclark
09-27-2007, 08:24 AM
Well, I certainly didn't read every line or download and run the code, but what are the contents of the file when you invoke the download URL with appropriate parameters directly from the browser address bar? If the file contents aren't good then, the front end you put on it via OL doesn't really matter.

I assume you have taken the URL from the fileupload.download() method Debug output and have run it?