|
opening create template on button click
Last post 05-17-2010, 3:57 AM by svk. 13 replies.
-
04-30-2010, 5:23 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
opening create template on button click
is it possible to open create template on a button click
how do i call the create template function on asp.net button click
|
|
-
04-30-2010, 9:52 AM |
-
Eric
-
-
-
Joined on 08-05-2009
-
-
Posts 1,269
-
-
|
Re: opening create template on button click
Please refer to file \CuteSoft_Client\CuteEditor\Dialogs\InsertTemplate.aspx, you can find
<asp:ImageButton id="NewTemplate" BorderWidth="1" Runat="server" AlternateText="[[NewTemplate]]" ImageUrl="../Load.ashx?type=image&file=newtemplate.gif" OnClick="NewTemplate_Click" />
Call "NewTemplate_Click" , it will pop up creating template dialog
Regards,
Eric
|
|
-
05-05-2010, 12:43 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click
i get erro rmsg
BC30456: 'NewTemplate_Click' is not a member of
Line 51: <asp:ImageButton id="NewTemplate" BorderWidth="1" Runat="server" AlternateText="[[NewTemplate]]" Line 52: ImageUrl="../Load.ashx?type=image&file=newtemplate.gif" OnClick="NewTemplate_Click" /> Line 53: <button id="CMD_EXIT" class="BUTTON" accesskey="x" type="button" runat="server" style="width: 62px;
i have this isn the script
<script type="text/javascript" language="javascript">
// var OxO5773=["hiddenDirectory","hiddenFile","hiddenAlert","hiddenAction","hiddenActionData","hiddenHTML","This function is disabled in the demo mode.","disabled","[[Disabled]]","[[SpecifyNewFolderName]]","","value","createdir","[[CopyMoveto]]","/","move","copy","[[AreyouSureDelete]]","parentNode","path","[[TemplateModified]]","OuterEditorFull.aspx?","\x26f=","dialogWidth:760px;dialogHeight:385px;help:no;scroll:no;status:no;resizable:0;","UseStandardDialog","1","\x26Dialog=Standard","setting=","EditorSetting","\x26Theme=","Theme","\x26","DNNArg","[[TemplateCreated]]","refresh","[[SpecifyNewFileName]]","innerHTML","isdir","true","text",".","rename","True","False",":","FoldersAndFiles","TR","length","onmouseover","this.bgColor=\x27#eeeeee\x27;","onmouseout","this.bgColor=\x27\x27;","nodeName","INPUT","changedir","url","TargetUrl","htmlcode","onload","getElementsByTagName","table","sortable"," ","className","id","rows","cells","\x3Ca href=\x22#\x22 onclick=\x22ts_resortTable(this);return false;\x22\x3E","\x3Cspan class=\x22sortarrow\x22\x3E\x26nbsp;\x3C/span\x3E\x3C/a\x3E","string","undefined","innerText","childNodes","nodeValue","nodeType","span","cellIndex","TABLE","sortdir","down","\x26uarr;","up","\x26darr;","sortbottom","tBodies","sortarrow","\x26nbsp;","20","19","Form1","Image1","FolderDescription","CreateDir","Copy","Move","NewTemplate","Delete","DoRefresh","contentWindow","framepreview","Button1","Button2","btn_zoom_in","btn_zoom_out","btn_Actualsize","?","src","body","document","\x26#",";","zoom","style","wrapupPrompt","iepromptfield","display","none","div","IEPromptBox","promptBlackout","border","1px solid #b0bec7","backgroundColor","#f0f0f0","position","absolute","width","330px","zIndex","100","\x3Cdiv style=\x22width: 100%; padding-top:3px;background-color: #DCE7EB; font-family: verdana; font-size: 10pt; font-weight: bold; height: 22px; text-align:center; background:url(Load.ashx?type=image\x26file=formbg2.gif) repeat-x left top;\x22\x3E[[InputRequired]]\x3C/div\x3E","\x3Cdiv style=\x22padding: 10px\x22\x3E","\x3CBR\x3E\x3CBR\x3E","\x3Cform action=\x22\x22 onsubmit=\x22return wrapupPrompt()\x22\x3E","\x3Cinput id=\x22iepromptfield\x22 name=\x22iepromptdata\x22 type=text size=46 value=\x22","\x22\x3E","\x3Cbr\x3E\x3Cbr\x3E\x3Ccenter\x3E","\x3Cinput type=\x22submit\x22 value=\x22\x26nbsp;\x26nbsp;\x26nbsp;[[OK]]\x26nbsp;\x26nbsp;\x26nbsp;\x22\x3E","\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;","\x3Cinput type=\x22button\x22 onclick=\x22wrapupPrompt(true)\x22 value=\x22\x26nbsp;[[Cancel]]\x26nbsp;\x22\x3E","\x3C/form\x3E\x3C/div\x3E","top","100px","left","offsetWidth","px","block","CuteEditor_ColorPicker_ButtonOver(this)"];var hiddenDirectory=Window_GetElement(window,OxO5773[0],true);var hiddenFile=Window_GetElement(window,OxO5773[1],true);var hiddenAlert=Window_GetElement(window,OxO5773[2],true);var hiddenAction=Window_GetElement(window,OxO5773[3],true);var hiddenActionData=Window_GetElement(window,OxO5773[4],true);var hiddenHTML=Window_GetElement(window,OxO5773[5],true);function CreateDir_click(){if(isDemoMode){alert(OxO5773[6]);return false;} ;if(Event_GetSrcElement()[OxO5773[7]]){alert(OxO5773[8]);return false;} ;if(Browser_IsIE7()){IEprompt(Ox218,OxO5773[9],OxO5773[10]);function Ox218@ ���
function NewTemplate_Click()
{
if(isDemoMode)
{alert(OxO5773[6]); return false;}
// ;function Ox354(Ox203){if(Ox203){alert(OxO5773[33]);hiddenActionData[OxO5773[11]]=OxO5773[10];hiddenAction[OxO5773[11]]=OxO5773[34];window.PostBackAction();} ;} ;if(Browser_IsIE7()){IEprompt(Ox218,OxO5773[35],OxO5773[10]);function Ox218(Ox379){if(Ox379){Ox379=FolderDescription[OxO5773[36]]+Ox379;editor.SetNextDialogWindow(window);editor.ShowDialog(Ox354,OxO5773[21]+GetDialogQueryString()+OxO5773[22]+Ox379+OxO5773[10],window,OxO5773[23]);return true;} else {return false;} ;} ;return Event_CancelEvent();} else {var Ox379=prompt(OxO5773[35],OxO5773[10]);if(Ox379){Ox379=FolderDescription[OxO5773[36]]+Ox379;editor.SetNextDialogWindow(window);editor.ShowDialog(Ox354,OxO5773[21]+GetDialogQueryString()+OxO5773[22]+Ox379+OxO5773[10],window,OxO5773[23]);return true;} else {return false;} ;} ;} ;function GetDialogQueryString(){var Ox119=OxO5773[10];if(editor.GetScriptProperty(OxO5773[24])==OxO5773[25]){Ox119=OxO5773[26];} ;return OxO5773[27]+editor.GetScriptProperty(OxO5773[28])+OxO5773[29]+editor.GetScriptProperty(OxO5773[30])+Ox119+OxO5773[31]+editor.GetScriptProperty(OxO5773[32]);} ;function RenImg_click(img){if(isDemoMode){alert(OxO5773[6]);return false;} ;if(img[OxO5773[7]]){alert(OxO5773[8]);return false;} ;var Ox37e=img[OxO5773[18]][OxO5773[18]];var Ox380;if(Browser_IsOpera()){Ox380=Ox37e.getAttribute(OxO5773[37])==OxO5773[38];} else {Ox380=Ox37e[OxO5773[37]];} ;var Ox37f=Ox37e[OxO5773[39]];var name;if(Browser_IsIE7()){var Oxc3;if(Ox380){IEprompt(Ox218,OxO5773[9],Ox37f);} else {var i=Ox37f.lastIndexOf(OxO5773[40]);Oxc3=Ox37f.substr(i);var Ox12=Ox37f.substr(0,Ox37f.lastIndexOf(OxO5773[40]));IEprompt(Ox218,OxO5773[35],Ox12);} ;function Ox218(Ox379){if(Ox379&&Ox379!=Ox37e[OxO5773[39]]){if(!Ox380){Ox379=Ox379+Oxc3;} ;hiddenAction[OxO5773[11]]=OxO5773[41];hiddenActionData[OxO5773[11]]=(Ox380?OxO5773[42]:OxO5773[43])+OxO5773[44]+Ox37e[OxO5773[19]]+OxO5773[44]+Ox379;window.PostBackAction();} ;} ;} else {if(Ox380){name=prompt(OxO5773[9],Ox37f);} else {var i=Ox37f.lastIndexOf(OxO5773[40]);var Oxc3=Ox37f.substr(i);var Ox12=Ox37f.substr(0,Ox37f.lastIndexOf(OxO5773[40]));name=prompt(OxO5773[35],Ox12);if(name){name=name+Oxc3;} ;} ;if(name&&name!=Ox37e[OxO5773[39]]){hiddenAction[OxO5773[11]]=OxO5773[41];hiddenActionData[OxO5773[11]]=(Ox380?OxO5773[42]:OxO5773[43])+OxO5773[44]+Ox37e[OxO5773[19]]+OxO5773[44]+name;window.PostBackAction();} ;} ;return Event_CancelEvent();} ;setMouseOver();function setMouseOver(){var FoldersAndFiles=Window_GetElement(window,OxO5773[45],true);var Ox383=FoldersAndFiles.getElementsByTagName(OxO5773[46]);for(var i=0;i<Ox383[OxO5773[47]];i++){var Ox37e=Ox383[i];Ox37e[OxO5773[48]]= new Function(OxO5773[10],OxO5773[49]);Ox37e[OxO5773[50]]= new Function(OxO5773[10],OxO5773[51]);} ;} ;function row_click(Ox37e){var Ox380;if(Browser_IsOpera()){Ox380=Ox37e.getAttribute(OxO5773[37])==OxO5773[38];} else {Ox380=Ox37e[OxO5773[37]];} ;if(Ox380){if(Event_GetSrcElement()[OxO5773[52]]==OxO5773[53]){return ;} ;hiddenAction[OxO5773[11]]=OxO5773[54];hiddenActionData[OxO5773[11]]=Ox37e.getAttribute(OxO5773[19]);window.PostBackAction();} else {var Ox102=Ox37e.getAttribute(OxO5773[19]);hiddenFile[OxO5773[11]]=Ox102;var Ox280=Ox37e.getAttribute(OxO5773[55]);Window_GetElement(window,OxO5773[56],true)[OxO5773[11]]=Ox280;var htmlcode=Ox37e.getAttribute(OxO5773[57]);if(htmlcode!=OxO5773[10]&&htmlcode!=null){do_preview(htmlcode);} else {try{Actualsize();} catch(x){do_preview();} ;} ;} ;} ;function do_preview(){} ;function reset_hiddens(){if(hiddenAlert[OxO5773[11]]){alert(hiddenAlert.value);} ;if(hiddenHTML[OxO5773[11]]){do_preview(hiddenHTML.value);} ;hiddenAlert[OxO5773[11]]=OxO5773[10];hiddenHTML[OxO5773[11]]=OxO5773[10];hiddenAction[OxO5773[11]]=OxO5773[10];hiddenActionData[OxO5773[11]]=OxO5773[10];} ;Event_Attach(window,OxO5773[58],reset_hiddens);function RequireFileBrowseScript(){} ;Event_Attach(window,OxO5773[58],sortables_init);var SORT_COLUMN_INDEX;function sortables_init(){if(!document[OxO5773[59]]){return ;} ;var Ox388=document.getElementsByTagName(OxO5773[60]);for(var Ox389=0;Ox389<Ox388[OxO5773[47]];Ox389++){var Ox38a=Ox388[Ox389];if(((OxO5773[62]+Ox38a[OxO5773[63]]+OxO5773[62]).indexOf(OxO5773[61])!=-1)&&(Ox38a[OxO5773[64]])){ts_makeSortable(Ox38a);} ;} ;} ;function ts_makeSortable(Ox38c){if(Ox38c[OxO5773[65]]&&Ox38c[OxO5773[65]][OxO5773[47]]>0){var Ox38d=Ox38c[OxO5773[65]][0];} ;if(!Ox38d){return ;} ;for(var i=2;i<4;i++){var Ox38e=Ox38d[OxO5773[66]][i];var Ox27b=ts_getInnerText(Ox38e);Ox38e[OxO5773[36]]=OxO5773[67]+Ox27b+OxO5773[68];} ;} ;function ts_getInnerText(Ox27){if( typeof Ox27==OxO5773[69]){return Ox27;} ;if( typeof Ox27==OxO5773[70]){return Ox27;} ;if(Ox27[OxO5773[71]]){return Ox27[OxO5773[71]];} ;var Ox24=OxO5773[10];var Ox33a=Ox27[OxO5773[72]];var Ox11=Ox33a[OxO5773[47]];for(var i=0;i<Ox11;i++){switch(Ox33a[i][OxO5773[74]]){case 1:Ox24+=ts_getInnerText(Ox33a[i]);break ;;case 3:Ox24+=Ox33a[i][OxO5773[73]];break ;;} ;} ;return Ox24;} ;function ts_resortTable(Ox391){var Ox29e;for(var Ox392=0;Ox392<Ox391[OxO5773[72]][OxO5773[47]];Ox392++){if(Ox391[OxO5773[72]][Ox392][OxO5773[52]]&&Ox391[OxO5773[72]][Ox392][OxO5773[52]].toLowerCase()==OxO5773[75]){Ox29e=Ox391[OxO5773[72]][Ox392];} ;} ;var Ox393=ts_getInnerText(Ox29e);var Ox1dd=Ox391[OxO5773[18]];var Ox394=Ox1dd[OxO5773[76]];var Ox38c=getParent(Ox1dd,OxO5773[77]);if(Ox38c[OxO5773[65]][OxO5773[47]]<=1){return ;} ;var Ox395=ts_getInnerText(Ox38c[OxO5773[65]][1][OxO5773[66]][Ox394]);var Ox396=ts_sort_caseinsensitive;if(Ox395.match(/^\d\d[\/-]\d\d[\/-]\d\d\d\d$/)){Ox396=ts_sort_date;} ;if(Ox395.match(/^\d\d[\/-]\d\d[\/-]\d\d$/)){Ox396=ts_sort_date;} ;if(Ox395.match(/^[?]/)){Ox396=ts_sort_currency;} ;if(Ox395.match(/^[\d\.]+$/)){Ox396=ts_sort_numeric;} ;SORT_COLUMN_INDEX=Ox394;var Ox38d= new Array();var Ox397= new Array();for(var i=0;i<Ox38c[OxO5773[65]][0][OxO5773[47]];i++){Ox38d[i]=Ox38c[OxO5773[65]][0][i];} ;for(var j=1;j<Ox38c[OxO5773[65]][OxO5773[47]];j++){Ox397[j-1]=Ox38c[OxO5773[65]][j];} ;Ox397.sort(Ox396);if(Ox29e.getAttribute(OxO5773[78])==OxO5773[79]){var Ox398=OxO5773[80];Ox397.reverse();Ox29e.setAttribute(OxO5773[78],OxO5773[81]);} else {Ox398=OxO5773[82];Ox29e.setAttribute(OxO5773[78],OxO5773[79]);} ;for(i=0;i<Ox397[OxO5773[47]];i++){if(!Ox397[i][OxO5773[63]]||(Ox397[i][OxO5773[63]]&&(Ox397[i][OxO5773[63]].indexOf(OxO5773[83])==-1))){Ox38c[OxO5773[84]][0].appendChild(Ox397[i]);} ;} ;for(i=0;i<Ox397[OxO5773[47]];i++){if(Ox397[i][OxO5773[63]]&&(Ox397[i][OxO5773[63]].indexOf(OxO5773[83])!=-1)){Ox38c[OxO5773[84]][0].appendChild(Ox397[i]);} ;} ;var Ox399=document.getElementsByTagName(OxO5773[75]);for(var Ox392=0;Ox392<Ox399[OxO5773[47]];Ox392++){if(Ox399[Ox392][OxO5773[63]]==OxO5773[85]){if(getParent(Ox399[Ox392],OxO5773[60])==getParent(Ox391,OxO5773[60])){Ox399[Ox392][OxO5773[36]]=OxO5773[86];} ;} ;} ;Ox29e[OxO5773[36]]=Ox398;} ;function getParent(Ox27,Ox39b){if(Ox27==null){return null;} else {if(Ox27[OxO5773[74]]==1&&Ox27[OxO5773[52]].toLowerCase()==Ox39b.toLowerCase()){return Ox27;} else {return getParent(Ox27.parentNode,Ox39b);} ;} ;} ;function ts_sort_date(Oxe7,b){var Ox39d=ts_getInnerText(Oxe7[OxO5773[66]][SORT_COLUMN_INDEX]);var Ox39e=ts_getInnerText(b[OxO5773[66]][SORT_COLUMN_INDEX]);if(Ox39d[OxO5773[47]]==10){var Ox39f=Ox39d.substr(6,4)+Ox39d.substr(3,2)+Ox39d.substr(0,2);} else {var Ox3a0=Ox39d.substr(6,2);if(parseInt(Ox3a0)<50){Ox3a0=OxO5773[87]+Ox3a0;} else {Ox3a0=OxO5773[88]+Ox3a0;} ;var Ox39f=Ox3a0+Ox39d.substr(3,2)+Ox39d.substr(0,2);} ;if(Ox39e[OxO5773[47]]==10){var Ox3a1=Ox39e.substr(6,4)+Ox39e.substr(3,2)+Ox39e.substr(0,2);} else {Ox3a0=Ox39e.substr(6,2);if(parseInt(Ox3a0)<50){Ox3a0=OxO5773[87]+Ox3a0;} else {Ox3a0=OxO5773[88]+Ox3a0;} ;var Ox3a1=Ox3a0+Ox39e.substr(3,2)+Ox39e.substr(0,2);} ;if(Ox39f==Ox3a1){return 0;} ;if(Ox39f<Ox3a1){return -1;} ;return 1;} ;function ts_sort_currency(Oxe7,b){var Ox39d=ts_getInnerText(Oxe7[OxO5773[66]][SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,OxO5773[10]);var Ox39e=ts_getInnerText(b[OxO5773[66]][SORT_COLUMN_INDEX]).replace(/[^0-9.]/g,OxO5773[10]);return parseFloat(Ox39d)-parseFloat(Ox39e);} ;function ts_sort_numeric(Oxe7,b){var Ox39d=parseFloat(ts_getInnerText(Oxe7[OxO5773[66]][SORT_COLUMN_INDEX]));if(isNaN(Ox39d)){Ox39d=0;} ;var Ox39e=parseFloat(ts_getInnerText(b[OxO5773[66]][SORT_COLUMN_INDEX]));if(isNaN(Ox39e)){Ox39e=0;} ;return Ox39d-Ox39e;} ;function ts_sort_caseinsensitive(Oxe7,b){var Ox39d=ts_getInnerText(Oxe7[OxO5773[66]][SORT_COLUMN_INDEX]).toLowerCase();var Ox39e=ts_getInnerText(b[OxO5773[66]][SORT_COLUMN_INDEX]).toLowerCase();if(Ox39d==Ox39e){return 0;} ;if(Ox39d<Ox39e){return -1;} ;return 1;} ;function ts_sort_default(Oxe7,b){var Ox39d=ts_getInnerText(Oxe7[OxO5773[66]][SORT_COLUMN_INDEX]);var Ox39e=ts_getInnerText(b[OxO5773[66]][SORT_COLUMN_INDEX]);if(Ox39d==Ox39e){return 0;} ;if(Ox39d<Ox39e){return -1;} ;return 1;} [sortables_init];RequireFileBrowseScript();var Form1=Window_GetElement(window,OxO5773[89],true);var hiddenDirectory=Window_GetElement(window,OxO5773[0],true);var hiddenFile=Window_GetElement(window,OxO5773[1],true);var hiddenAlert=Window_GetElement(window,OxO5773[2],true);var hiddenAction=Window_GetElement(window,OxO5773[3],true);var hiddenActionData=Window_GetElement(window,OxO5773[4],true);var Image1=Window_GetElement(window,OxO5773[90],true);var FolderDescription=Window_GetElement(window,OxO5773[91],true);var CreateDir=Window_GetElement(window,OxO5773[92],true);var Copy=Window_GetElement(window,OxO5773[93],true);var Move=Window_GetElement(window,OxO5773[94],true);var NewTemplate=Window_GetElement(window,OxO5773[95],true);var FoldersAndFiles=Window_GetElement(window,OxO5773[45],true);var Delete=Window_GetElement(window,OxO5773[96],true);var DoRefresh=Window_GetElement(window,OxO5773[97],true);var framepreview=document.getElementById(OxO5773[99])[OxO5773[98]];var TargetUrl=Window_GetElement(window,OxO5773[56],true);var Button1=Window_GetElement(window,OxO5773[100],true);var Button2=Window_GetElement(window,OxO5773[101],true);var btn_zoom_in=Window_GetElement(window,OxO5773[102],true);var btn_zoom_out=Window_GetElement(window,OxO5773[103],true);var btn_Actualsize=Window_GetElement(window,OxO5773[104],true);var editor=Window_GetDialogArguments(window);var htmlcode=OxO5773[10];function do_preview(Ox27a){htmlcode=Ox27a;if(Ox27a==OxO5773[10]||Ox27a==null){var Ox228=TargetUrl[OxO5773[11]];if(Ox228.indexOf(OxO5773[105])!=-1){document.getElementById(OxO5773[99])[OxO5773[106]]=Ox228;} else {framepreview[OxO5773[108]][OxO5773[107]][OxO5773[36]]=OxO5773[10];} ;} else {framepreview[OxO5773[108]][OxO5773[107]][OxO5773[36]]=Ox27a;} ;} ;function do_insert(){var Ox228=TargetUrl[OxO5773[11]];if(Ox228.indexOf(OxO5773[105])!=-1){htmlcode=framepreview[OxO5773[108]][OxO5773[107]][OxO5773[36]];} ;htmlcode=htmlcode.replace(/[\u00A0-\u00FF|\u00FF-\uFFFF]/g,function (Oxe7,b,Ox239){return OxO5773[109]+Oxe7.charCodeAt(0)+OxO5773[110];} );editor.PasteHTML(htmlcode);Window_CloseDialog(window);} ;function do_Close(){Window_CloseDialog(window);} ;function Zoom_In(){if(framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]!=0){framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]*=1.1;} else {framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]=1.1;} ;} ;function Zoom_Out(){if(framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]!=0){framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]*=0.8;} else {framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]=0.8;} ;} ;function Actualsize(){framepreview[OxO5773[108]][OxO5773[107]][OxO5773[112]][OxO5773[111]]=1;do_preview(htmlcode);} ;if(Browser_IsIE7()){var _dialogPromptID=null;function IEprompt(Ox218,Ox219,Ox21a){that=this;this[OxO5773[113]]=function (Ox21b){val=document.getElementById(OxO5773[114])[OxO5773[11]];_dialogPromptID[OxO5773[112]][OxO5773[115]]=OxO5773[116];document.getElementById(OxO5773[114])[OxO5773[11]]=OxO5773[10];if(Ox21b){val=OxO5773[10];} ;Ox218(val);return false;} ;if(Ox21a==undefined){Ox21a=OxO5773[10];} ;if(_dialogPromptID==null){var Ox21c=document.getElementsByTagName(OxO5773[107])[0];tnode=document.createElement(OxO5773[117]);tnode[OxO5773[64]]=OxO5773[118];Ox21c.appendChild(tnode);_dialogPromptID=document.getElementById(OxO5773[118]);tnode=document.createElement(OxO5773[117]);tnode[OxO5773[64]]=OxO5773[119];Ox21c.appendChild(tnode);_dialogPromptID[OxO5773[112]][OxO5773[120]]=OxO5773[121];_dialogPromptID[OxO5773[112]][OxO5773[122]]=OxO5773[123];_dialogPromptID[OxO5773[112]][OxO5773[124]]=OxO5773[125];_dialogPromptID[OxO5773[112]][OxO5773[126]]=OxO5773[127];_dialogPromptID[OxO5773[112]][OxO5773[128]]=OxO5773[129];} ;var Ox21d=OxO5773[130];Ox21d+=OxO5773[131]+Ox219+OxO5773[132];Ox21d+=OxO5773[133];Ox21d+=OxO5773[134]+Ox21a+OxO5773[135];Ox21d+=OxO5773[136];Ox21d+=OxO5773[137];Ox21d+=OxO5773[138];Ox21d+=OxO5773[139];Ox21d+=OxO5773[140];_dialogPromptID[OxO5773[36]]=Ox21d;_dialogPromptID[OxO5773[112]][OxO5773[141]]=OxO5773[142];_dialogPromptID[OxO5773[112]][OxO5773[143]]=parseInt((document[OxO5773[107]][OxO5773[144]]-315)/2)+OxO5773[145];_dialogPromptID[OxO5773[112]][OxO5773[115]]=OxO5773[146];var Ox21e=document.getElementById(OxO5773[114]);try{var Ox21f=Ox21e.createTextRange();Ox21f.collapse(false);Ox21f.select();} catch(x){Ox21e.focus();} ;} ;} ;if(!Browser_IsWinIE()){btn_zoom_in[OxO5773[112]][OxO5773[115]]=btn_zoom_out[OxO5773[112]][OxO5773[115]]=btn_Actualsize[OxO5773[112]][OxO5773[115]]=OxO5773[116];} ;if(CreateDir){CreateDir[OxO5773[48]]= new Function(OxO5773[147]);} ;if(Copy){Copy[OxO5773[48]]= new Function(OxO5773[147]);} ;if(Move){Move[OxO5773[48]]= new Function(OxO5773[147]);} ;if(Delete){Delete[OxO5773[48]]= new Function(OxO5773[147]);} ;if(DoRefresh){DoRefresh[OxO5773[48]]= new Function(OxO5773[147]);} ;if(btn_zoom_in){btn_zoom_in[OxO5773[48]]= new Function(OxO5773[147]);} ;if(btn_zoom_out){btn_zoom_out[OxO5773[48]]= new Function(OxO5773[147]);} ;if(btn_Actualsize){btn_Actualsize[OxO5773[48]]= new Function(OxO5773[147]);} ;if(NewTemplate){NewTemplate[OxO5773[48]]= new Function(OxO5773[147]);} ;
</script>
</ head>
|
|
-
05-05-2010, 3:02 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: opening create template on button click
Hi svk,
Try
- <%@ Page Language="C#" ValidateRequest="false" %>
-
- <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
- <html>
- <head>
- </head>
- <body>
- <form id="Form1" runat="server">
- <CE:Editor ID="editor1" runat="server">
- </CE:Editor>
-
- <asp:Button ID="button1" runat="server" Text="Open Template" OnClientClick="openTemplate();return false" />
- </form>
- </body>
- </html>
-
- <script>
- var editor1=document.getElementById("<%= editor1.ClientID %>");
- function openTemplate()
- {
- editor1.ExecCommand("InsertTemplate");
-
- }
- </script>
Regards,
ken
|
|
-
05-11-2010, 5:09 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
getting error
Object reference not set to an instance of an object. at
var editor1=document.getElementById("<%= editor1.ClientID %>");
|
|
-
05-11-2010, 12:05 PM |
-
Eric
-
-
-
Joined on 08-05-2009
-
-
Posts 1,269
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
I have tested ken's code, it works.
<%@ Page Language="C#" ValidateRequest="false" %> <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<html> <head> </head> <body> <form id="Form1" runat="server"> <CE:Editor ID="editor1" runat="server"> </CE:Editor> <asp:Button ID="button1" runat="server" Text="Open Template" OnClientClick="openTemplate();return false" /> </form> </body> </html> <script> var editor1 = document.getElementById("<%= editor1.ClientID %>"); function openTemplate() { editor1.ExecCommand("InsertTemplate"); } </script>
Please check whether the value of ID is same as the value of script
<CE:Editor ID="editor1" runat="server"> </CE:Editor>
Regards,
Eric
|
|
-
05-12-2010, 12:49 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
i have done the same
it works in one application on the system
but on other application in the same system it gives "object ref error....................."
i even copied the code given by u on a new page but in this second application i get the same error
System.NullReferenceException was unhandled by user code Message="Object reference not set to an instance of an object." Source="CuteEditor" StackTrace: at CuteEditor.Impl.b..ctor(Type type, String key) at CuteEditor.Impl.d.a(Type A_0, String A_1) at CuteEditor.Editor.a.a.i(HtmlTextWriter A_0) at CuteEditor.Editor.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at ASP.mail_send_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\crmpark\crmpark\mail_send.aspx:line 189 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
|
-
05-12-2010, 4:56 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
svk:
i have done the same
it works in one application on the system
but on other application in the same system it gives "object ref error....................."
i even copied the code given by u on a new page but in this second application i get the same error
System.NullReferenceException was unhandled by user code Message="Object reference not set to an instance of an object." Source="CuteEditor" StackTrace: at CuteEditor.Impl.b..ctor(Type type, String key) at CuteEditor.Impl.d.a(Type A_0, String A_1) at CuteEditor.Editor.a.a.i(HtmlTextWriter A_0) at CuteEditor.Editor.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at ASP.mail_send_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in D:\crmpark\crmpark\mail_send.aspx:line 189 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Hi svk,
Please debug you application and post here which line cause this error.
Regards,
ken
|
|
-
05-13-2010, 12:20 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
hi
this line causes error
var editor1 = document.getElementById("<%= editor1.ClientID %>");
|
|
-
05-13-2010, 9:54 PM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
svk:
hi
this line causes error
var editor1 = document.getElementById("<%= editor1.ClientID %>");
Hi svk,
Can you set up ftp access for me? So I can check it for you.
Please send your site and ftp info to Kenneth@CuteSoft.net, I will check it and get back to you as soon as possible.
Regards,
Ken
|
|
-
05-14-2010, 4:27 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click--Object reference not set to an instance of an object
i recopied the editor dlls to bin folder its working now fine
|
|
-
05-15-2010, 1:31 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click--only creatingthe template buttton
hi
i have used tha baove and its working fine
but is it possible to separate the creating template button & selection of template
i mean now at present using above code i get the both the selction as well as create new template
i just need that on new template button click the function for cration of new template be opend with the selction
|
|
-
05-17-2010, 3:01 AM |
-
Kenneth
-
-
-
Joined on 02-13-2008
-
-
Posts 3,886
-
-
|
Re: opening create template on button click--only creatingthe template buttton
svk:
hi
i have used tha baove and its working fine
but is it possible to separate the creating template button & selection of template
i mean now at present using above code i get the both the selction as well as create new template
i just need that on new template button click the function for cration of new template be opend with the selction
Hi svk,
for now, editor does not support this feature.
Regards,
ken
|
|
-
05-17-2010, 3:57 AM |
-
svk
-
-
-
Joined on 04-24-2010
-
-
Posts 44
-
-
|
Re: opening create template on button click--only creatingthe template buttton
ok thanks
if any updates reg the same let me know
|
|
|
|
|