| |||||||||||
| |||||||||||
Unliked characters Posted by TedH (TedH), 6 May 2005 Sometimes I gotta laugh. This really got me.I had tried the code for passing values to a form we talked about sometime back and that didn't actually work (maybe way I did it). So okay I got it working by putting $input{"f003"} in the textarea. Now I can edit and delete records okay. Except ..... it does not like these characters: hashmark # pipe | plus sign + equal sign = Ampersand & Single quote ' Or (this is where I laughed) 2002 characters in the field. It worked great with 2001 characters. Why one earth does it hang at 2002 characters plus? What's it got against that 2002nd character? It's a nice character: it doesn't take drugs, it doesn't support strange political parties and it doesn't drive weird eastern European cars. Open file and make links $f001 is date and time - works okay. $f002 is subject - works okay. $f003 is field for text entry. Code:
Form it's passed to in separate script [code]print <<"EOF"; <b>Edit Record</b> <form action="editrec.pl" method="POST"> <input type="hidden" name="f001" value="$input{"f001"}"> <input type="hidden" name="f002" value="$input{"f002"}"> <input type="hidden" name="f003" value="$input{"f003"}"> <table bgcolor='#00cccc' align='center' border='0' cellpadding='7' cellspacing='1'> <tr><td align='left'> $input{"f001"}<br> <b>$input{"f002"}</b> <br> <textarea name='nf003' rows='10' cols='50'>$input{"f003"} Posted by TedH (TedH), 6 May 2005 What happened here? Does YABB have the same problem?I'll redo the second bit. Posted by TedH (TedH), 6 May 2005 Form it's passed to in separate scriptCode:
I did try max chars in the textarea to no avail. I also tried passing the value from a text link as well as form button - made no difference. Did hours of searching on the net but came up with nothing - so back here again. O what fun we have Posted by admin (Graham Ellis), 6 May 2005 on 05/06/05 at 12:43:26, TedH wrote:
YaBB has some things it takes as special tags and smilies. I'm running a Python course today ... will respond with a Perl answer this evening, but it won't be during the UK working day Posted by admin (Graham Ellis), 7 May 2005 Ted,Yes, I know what the problem is. I've written a very long answer that's of quite general interest so I'v posted it into our solutions centre. And this link here will take you directly to the page. Posted by TedH (TedH), 7 May 2005 Graham, read the article, thanks. The parse is virtually identical to mine. I solved the problem partially by accident (during a tidy up). In the form which has the button for the edit or delete script, single quotes were used. When double quotes were used, words which contain an apostrophe - like don't and it'll - showed up fine (other characters still fail). Looks as though I'm stuck with the 2k limit the way the data is passed (using the ?). So I shall look for another way to do that. I suppose this applies to all databases flat-file or otherwise. Since this is going to be a diary 2k is way too small. I know about the 32k limit, but doubt any entry will ever reach that size. Posted by TedH (TedH), 8 May 2005 Got it working. Tested a 2.5mb field entry and it work (slowly) fine. I could edit it and delete (I had read and been told once that a textarea would only handle a max of 32k - looks like that was wrong info).Passing the values was done using "input type=hidden" form fields - as long as the values are matching with the way the database is read it works. The characters were solved with: (code didn't work here) I used entities like mentioned previously which are field specific. The other characters work fine as is now. The only thing left to do is make the textarea in the editing form have a linebreak instead of showing the existing BR tags during the edit. many thanks - Ted This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
|
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |