chanchelkumar Posted May 3, 2007 Share Posted May 3, 2007 Hi... I am using Innova editor... when I submit a form (where the Editor is embedded), the current content is not submitted. The editor is included to this page... please help me!!!! Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/ Share on other sites More sharing options...
jitesh Posted May 3, 2007 Share Posted May 3, 2007 on next page write this. <?php echo "<pre>"; print_r($_REQUEST); ?> and check do you found values ? Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244059 Share on other sites More sharing options...
chanchelkumar Posted May 3, 2007 Author Share Posted May 3, 2007 Jitesh... I got something like this!!!!! Array ( [menu] => [txtContent] => [CDSESSIONID] => 97463708 [CDABTESTS] => [phpSESSID] => 54d728d519f2b3174d5227614f995255 ) Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244075 Share on other sites More sharing options...
jitesh Posted May 3, 2007 Share Posted May 3, 2007 is "txtContent" given name to editor component ? Post script how have you emmbeded editor ? Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244088 Share on other sites More sharing options...
chanchelkumar Posted May 3, 2007 Author Share Posted May 3, 2007 <?php include('function.php'); $msg=$_REQUEST['msg']; connect_to_db(); $query="SELECT * from t2i_menu"; $result=mysql_query($query) or die (mysql_error()); ?> <script language="javascript"> function addpagecheck(){ if(document.addpage.menu.value==""){ alert("Please select the Menu"); document.addpage.menu.focus(); return false; } if(document.addpage.xtContent.value==""){ alert("Please enter the Content"); document.addpage.xtContent.focus(); return false; } else return true; } </script> <script language=JavaScript src='../../Editor/scripts/innovaeditor.js'></script> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <form action="insertpage.php" method="get" name="Form1" id="Form1"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td width="5%"> </td> <td width="17%"> </td> <td width="78%" class="msg"><?php echo $msg; ?> </td> </tr> <tr> <td> </td> <td>Select Menu Item </td> <td><select name="menu" style="width:50%;"> <option value=""><--- Select Menu ---></option> <?php while($row=mysql_fetch_array($result)){ $menuname=$row['menuname']; ?> <option value="<?php echo $menuname; ?>"><?php echo $menuname; ?></option> <?php }?> </select></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>Add Content here </td> <td> <!-- <script> var oEdit1 = new InnovaEditor("oEdit1"); /*************************************************** SETTING EDITOR DIMENSION (WIDTH x HEIGHT) ***************************************************/ oEdit1.width=775;//You can also use %, for example: oEdit1.width="100%" oEdit1.height=350; /*************************************************** SHOWING DISABLED BUTTONS ***************************************************/ oEdit1.btnPrint=true; oEdit1.btnPasteText=true; oEdit1.btnFlash=true; oEdit1.btnMedia=true; oEdit1.btnLTR=true; oEdit1.btnRTL=true; oEdit1.btnSpellCheck=true; oEdit1.btnStrikethrough=true; oEdit1.btnSuperscript=true; oEdit1.btnSubscript=true; oEdit1.btnClearAll=true; oEdit1.btnSave=true; oEdit1.btnStyles=true; //Show "Styles/Style Selection" button /*************************************************** APPLYING STYLESHEET (Using external css file) ***************************************************/ oEdit1.css="style/test.css"; //Specify external css file here /*************************************************** APPLYING STYLESHEET (Using predefined style rules) ***************************************************/ /* oEdit1.arrStyle = [["BODY",false,"","font-family:Verdana,Arial,Helvetica;font-size:x-small;"], [".ScreenText",true,"Screen Text","font-family:Tahoma;"], [".ImportantWords",true,"Important Words","font-weight:bold;"], [".Highlight",true,"Highlight","font-family:Arial;color:red;"]]; If you'd like to set the default writing to "Right to Left", you can use: oEdit1.arrStyle = [["BODY",false,"","direction:rtl;unicode-bidi:bidi-override;"]]; */ /*************************************************** ENABLE ASSET MANAGER ADD-ON ***************************************************/ oEdit1.cmdAssetManager = "modalDialogShow('/Editor/assetmanager/assetmanager.php',640,465)"; //Command to open the Asset Manager add-on. //Use relative to root path (starts with "/") /*************************************************** ADDING YOUR CUSTOM LINK LOOKUP ***************************************************/ oEdit1.cmdInternalLink = "modelessDialogShow('links.htm',365,270)"; //Command to open your custom link lookup page. /*************************************************** ADDING YOUR CUSTOM CONTENT LOOKUP ***************************************************/ oEdit1.cmdCustomObject = "modelessDialogShow('objects.htm',365,270)"; //Command to open your custom content lookup page. /*************************************************** USING CUSTOM TAG INSERTION FEATURE ***************************************************/ oEdit1.arrCustomTag=[["First Name","{%first_name%}"], ["Last Name","{%last_name%}"], ["Email","{%email%}"]];//Define custom tag selection /*************************************************** SETTING COLOR PICKER's CUSTOM COLOR SELECTION ***************************************************/ oEdit1.customColors=["#ff4500","#ffa500","#808000","#4682b4","#1e90ff","#9400d3","#ff1493","#a9a9a9"];//predefined custom colors /*************************************************** SETTING EDITING MODE Possible values: - "HTMLBody" (default) - "XHTMLBody" - "HTML" - "XHTML" ***************************************************/ oEdit1.mode="XHTMLBody"; oEdit1.REPLACE("txtContent"); </script> --> <?php include("../../Editor/example02_complete/default.php"); ?> </td> </tr> <!--<tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>Header Caption : </td> <td><input name="caption" type="text" size="32" /></td> </tr>--> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td></td> </tr> <tr> <td><input type="submit" value="Submit" id="btnSubmit"></td> <td> </td> <td> </td> </tr> </form> </table> Iside tthis code i include that editor..... Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244094 Share on other sites More sharing options...
chanchelkumar Posted May 3, 2007 Author Share Posted May 3, 2007 Jitesh.... This was the code..... Forget about the above one!!!!! txtConte <?php include('function.php'); $msg=$_REQUEST['msg']; connect_to_db(); $query="SELECT * from t2i_menu"; $result=mysql_query($query) or die (mysql_error()); ?> <script language="javascript"> function addpagecheck(){ if(document.addpage.menu.value==""){ alert("Please select the Menu"); document.addpage.menu.focus(); return false; } if(document.addpage.xtContent.value==""){ alert("Please enter the Content"); document.addpage.xtContent.focus(); return false; } else return true; } </script> <script language=JavaScript src='../../Editor/scripts/innovaeditor.js'></script> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <form action="insertpage.php" method="get" name="Form1" id="Form1"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td width="5%"> </td> <td width="17%"> </td> <td width="78%" class="msg"><?php echo $msg; ?> </td> </tr> <tr> <td> </td> <td>Select Menu Item </td> <td><select name="menu" style="width:50%;"> <option value=""><--- Select Menu ---></option> <?php while($row=mysql_fetch_array($result)){ $menuname=$row['menuname']; ?> <option value="<?php echo $menuname; ?>"><?php echo $menuname; ?></option> <?php }?> </select></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>Add Content here </td> <td> <?php include("../../Editor/example02_complete/default.php"); ?> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td></td> </tr> <tr> <td><input type="submit" value="Submit" id="btnSubmit"></td> <td> </td> <td> </td> </tr> </form> </table> Here i try to include the editor.... <?php include("../../Editor/example02_complete/default.php"); ?> Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244101 Share on other sites More sharing options...
jitesh Posted May 3, 2007 Share Posted May 3, 2007 Script in default.php ? Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244121 Share on other sites More sharing options...
chanchelkumar Posted May 3, 2007 Author Share Posted May 3, 2007 <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style> body{font:11px verdana,arial,sans-serif;} a{color:#cc0000;font-size:xx-small;} </style> <script language=JavaScript src='../scripts/innovaeditor.js'></script> <script language="Javascript"> function doSubmit() { //Your custom code here.. //document.forms.Form1.onsubmit(); document.forms.Form1.submit() } </script> </head> <body> <!--<h4>Full Features (PHP example) - <a href="../default.htm">Back</a></h4>--> <form method="post" action="default_result.php" id="Form1"> <textarea id="txtContent" name="txtContent" rows=4 cols=25></textarea> <script> var oEdit1 = new InnovaEditor("oEdit1"); /*************************************************** SETTING EDITOR DIMENSION (WIDTH x HEIGHT) ***************************************************/ oEdit1.width=510;//You can also use %, for example: oEdit1.width="100%" oEdit1.height=350; /*************************************************** SHOWING DISABLED BUTTONS ***************************************************/ oEdit1.btnPrint=true; oEdit1.btnPasteText=true; oEdit1.btnFlash=true; oEdit1.btnMedia=true; oEdit1.btnLTR=true; oEdit1.btnRTL=true; oEdit1.btnSpellCheck=true; oEdit1.btnStrikethrough=true; oEdit1.btnSuperscript=true; oEdit1.btnSubscript=true; oEdit1.btnClearAll=true; oEdit1.btnSave=true; oEdit1.btnStyles=true; //Show "Styles/Style Selection" button /*************************************************** APPLYING STYLESHEET (Using external css file) ***************************************************/ oEdit1.css="style/test.css"; //Specify external css file here /*************************************************** APPLYING STYLESHEET (Using predefined style rules) ***************************************************/ /* oEdit1.arrStyle = [["BODY",false,"","font-family:Verdana,Arial,Helvetica;font-size:x-small;"], [".ScreenText",true,"Screen Text","font-family:Tahoma;"], [".ImportantWords",true,"Important Words","font-weight:bold;"], [".Highlight",true,"Highlight","font-family:Arial;color:red;"]]; If you'd like to set the default writing to "Right to Left", you can use: oEdit1.arrStyle = [["BODY",false,"","direction:rtl;unicode-bidi:bidi-override;"]]; */ /*************************************************** ENABLE ASSET MANAGER ADD-ON ***************************************************/ oEdit1.cmdAssetManager = "modalDialogShow('/Editor/assetmanager/assetmanager.php',640,465)"; //Command to open the Asset Manager add-on. //Use relative to root path (starts with "/") /*************************************************** ADDING YOUR CUSTOM LINK LOOKUP ***************************************************/ oEdit1.cmdInternalLink = "modelessDialogShow('links.htm',365,270)"; //Command to open your custom link lookup page. /*************************************************** ADDING YOUR CUSTOM CONTENT LOOKUP ***************************************************/ oEdit1.cmdCustomObject = "modelessDialogShow('objects.htm',365,270)"; //Command to open your custom content lookup page. /*************************************************** USING CUSTOM TAG INSERTION FEATURE ***************************************************/ oEdit1.arrCustomTag=[["First Name","{%first_name%}"], ["Last Name","{%last_name%}"], ["Email","{%email%}"]];//Define custom tag selection /*************************************************** SETTING COLOR PICKER's CUSTOM COLOR SELECTION ***************************************************/ oEdit1.customColors=["#ff4500","#ffa500","#808000","#4682b4","#1e90ff","#9400d3","#ff1493","#a9a9a9"];//predefined custom colors /*************************************************** SETTING EDITING MODE Possible values: - "HTMLBody" (default) - "XHTMLBody" - "HTML" - "XHTML" ***************************************************/ oEdit1.mode="XHTMLBody"; oEdit1.REPLACE("txtContent"); </script> <input type="button" value="Save" onclick="doSubmit()"> </form> </body> </html> this is the code in default.php Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244129 Share on other sites More sharing options...
jitesh Posted May 3, 2007 Share Posted May 3, 2007 nested forms are not allow so remove form tags from deafault.php and try. Link to comment https://forums.phpfreaks.com/topic/49755-editor-content-not-submitted/#findComment-244135 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.