Re: After certain lengt of text in editor, form cannot be submited.

  •  03-24-2004, 9:47 PM

    Re: After certain lengt of text in editor, form cannot be submited.

    Patrick - How much text are we talking about? 5,000 characters? 20,000 characters? More? I have tested 50,000 characters with no problems. Here is my code if it helps:

     

    <SCRIPT language="JavaScript1.2">

    function submitForm() {
     if (validateForm()) {
      document.forms[0].submit() ;
       }
    }

    function validateForm() {
    return true;
    }
    </SCRIPT>

    <!-- #include file="inc/page_header.inc" -->

    <Form Name="FrontPage_Form1" Action="Inv_Mkt_Comment_Add_Process.asp" Method=POST>
    <TABLE width=100% height=100% cellpadding=2 cellspacing=0>
     <TR>
      <TD valign=top>

      <TABLE cellpadding=2 cellspacing=0 border=0> 
       <tr>
         <td valign=top class="ms-formbody"><b>Add Market Commentary</b></td>
       <TR>
      </TABLE>
     
      <TABLE cellpadding=2 cellspacing=0 border=0>
       <TR>  
        <TD class="ms-toolbar" nowrap>
            <table cellpadding=1 cellspacing=0 border=0>
            <tr>
               <td class="ms-toolbar" nowrap> <a class="ms-toolbar" href="javascript:submitForm();" onfocus="save(Editor1)" target="_self"> <img src="images/saveitem.gif" alt="Save" border=0 width=16 height=16> </a> </td> <td nowrap> <a class="ms-toolbar" href="javascript:submitForm();" onfocus="save(Editor1)" target="_self">
                   <LocID ID="L_NewFormSaveClose">Save and Close</LocID>
               </a> </td>
            </tr>
            </table>
        </TD>
        <TD class=ms-separator>|</td>
        <TD class="ms-toolbar">
            <table cellpadding=1 cellspacing=0 border=0>
            <tr>
                <td colspan=2 nowrap>
                    <a class="ms-toolbar" href="javascript: history.back();" target="_self">
                           <LocID ID="L_NewFormGoBack">Cancel</LocID>
                    </a>
                </td>
            </tr>
            </table>
        </TD>    
       </TR>
      </TABLE>

      <table width=100% border=0 cellpadding=0 cellspacing=2>
      <tr>
       <td class="ms-sectionline" colspan=3 height=1><img border=0 width=1 height=1 src="images/blank.gif"></td>
      </tr>
      </table>

    <TABLE border=0 cellpadding=2>
    <tr>
      <TH valign=middle class="ms-formlabel">Year:<font color=red> *</font></TH>
      <TD class="ms-formbody"><select size="1" name="nYear">
         <%
     For i=Year(Now)-8 to Year(Now)+1
              %>
              <option <% If cInt(nYear)=i Then Response.Write "SELECTED" End If %> value="<%=i%>"><%=i%></option>
              <%
     Next
     %>
            </select></TD>
    </tr>
    <tr>
      <TH valign=middle class="ms-formlabel">Quarter:<font color=red> *</font></TH>
      <TD class="ms-formbody"><select size="1" name="nQuarter">
         <%
     For i=1 to 4
              %>
              <option <% If cInt(nQuarter)=i Then Response.Write "SELECTED" End If %> value="<%=i%>">Q<%=i%></option>
              <%
     Next
     %>
            </select></TD>
    </tr>
    <TR><TH valign=top class="ms-formlabel">Commentary:</TH>
      <TD class="ms-formbody">
    <%
     Dim editor
     Set editor = New CuteEditor 'Create a new editor class object
     editor.ID = "Editor1" 'Set the ID of this editor class
     editor.Text = strNotes 'Set the initial HTML value of editor control
     editor.FilesPath = "CuteEditor/CuteEditor_Files"
     editor.ImageGalleryPath = "/Uploads"
     editor.MaxImageSize = 50
     editor.HelpUrl = "http://yahoo.com"
     editor.AutoConfigure = "enableall"
     editor.DisableItemList = "Save"
     editor.StyleDropDownMenuNames = temp_styledropdownMenuNames
     editor.StyleDropDownMenuList = temp_styledropdownMenuList
     editor.CodeSnippetDropDownMenuNames = temp_snippetDropDownMenuNames
     editor.CodeSnippetDropDownMenuList = temp_snippetDropDownMenuList
     editor.ImagesDropDownMenuNames = temp_imagesDropDownMenuNames
     editor.ImagesDropDownMenuList = temp_imagesDropDownMenuList
     editor.LinksDropDownMenuNames = temp_linksDropDownMenuNames
     editor.LinksDropDownMenuList = temp_linksDropDownMenuList
     'editor.Template= "Bold,Italic,Underline"
     'editor.StyleSheetPath = "/CuteEditor/grey.css"
     editor.Width = 550
     editor.Height = 300
     editor.Draw()
    %>
      </TD>
    </TR>
    <tr>
      <TD valign=middle class="ms-formlabel" colspan="2"><input type="checkbox" name="bPublished" value="ON"> Check here to Publish this commentary.</TD>
    </tr>
    </table>

    </form>

View Complete Thread