Jump to content

post character limit HTMLAREA


benaust

Recommended Posts

Hi Guys

I am using an htmlarea editor and when trying to add more than 1000 characters to this area it gives me an error. The html area editor opens a text file and then posts the changes and rewrites that text file.

 

Any way around this to make it unlimited?

 

Link to comment
Share on other sites

Hi there

I have put a summery of the two pages doing this below. One page is to read and view the text file content, and the other is to save the htmlarea back to the text file. Thanks for your help

 

<!-- This Section Is JQuery HTMLAREA Code -->
<!-- JQuery_Lib -->
<link href="jquery.cleditor.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="JQuery_Lib/jquery-1.4.3.js"></script>
<script type="text/javascript" src="jquery.cleditor.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#content").cleditor({
width: 780, // width not including margins, borders or padding
height: 350, // height not including margins, borders or padding
controls: // controls to add to the toolbar
"bold italic underline strikethrough subscript superscript | font size " +
"style | color highlight removeformat | bullets numbering | outdent " +
"indent | alignleft center alignright justify | undo redo | " +
"cut copy paste pastetext | print source",
colors: // colors in the color popup
"FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF " +
"CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F " +
"BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C " +
"999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C " +
"666 900 C60 C93 990 090 399 33F 60C 939 " +
"333 600 930 963 660 060 366 009 339 636 " +
"000 300 630 633 330 030 033 006 309 303", 
fonts: // font names in the font popup
"Tahoma, Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
"Georgia,Impact,Sans Serif,Serif,Trebuchet MS,Verdana",
sizes: // sizes in the font size popup
"1,2,3,4,5,6,7",
styles: // styles in the style popup
[["Paragraph", "<p>"], ["Header 1", "<h1>"], ["Header 2", "<h2>"],
["Header 3", "<h3>"], ["Header 4","<h4>"], ["Header 5","<h5>"],
["Header 6","<h6>"]],
useCSS: true, // use CSS to style HTML when possible (not supported in ie)
docType: // Document type contained within the editor
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
docCSSFile: // CSS file used to style the document contained within the editor
"", 
bodyStyle: // style to assign to document body contained within the editor
"margin:4px; font:11pt Tahoma,Arial,Verdana; cursor:text"
});
});
</script>

<!-- This Section Is To Read The Text File Into The HTMLAREA  -->
<form name="notes" method="get" action="NewsAction.php">
<textarea name="content" id="content" rows="19" wrap="virtual" class="FormF1" style="width: 100%">
$file = 'News.txt';
$fh = fopen($file, 'r');
$data = fread($fh, filesize($file));
fclose($fh); 
echo $data; 

</textarea>
</form>

<!-- This Section Is To Write To Text File  -->
$content = $_GET["content"];

$file = "News.txt";
$fp= fopen($file,"w");
$fp= fopen($file,"a+");
fputs($fp, stripslashes("$content"));
fclose ($fp);
{ header("Location: News.php"); exit; }

Link to comment
Share on other sites

Surely using GET with a string longer than so many characters will not work correctly, most likely not send the actual request or cutting it off the string at a certain point.

 

Trying using POST instead of GET you can send alot more data that way.

 

I'll see if I can find some links to better explain :)

 

Regards, Paul.

Link to comment
Share on other sites

Thank You Paul

 

I did notice that and in the past I remember I had to contact the host to increase post characters. What I do not understand is that when looking at different application like carts and they use HTML area why they do not run into this problem, is it because I am using text file to update instead of database?

 

I appreciate you help. This will go a long way. Thank you again.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.