Forum JavaScript broken - with Fix

Advertisement

Guest

Forum JavaScript broken - with Fix

Inserting emoticons and bold/italic/.. does not work here in IE6 and FireFox. I checked the source and found that you have to change the name of the input-textarea:

Old:
... textarea name="zprava3" ...

New:
... textarea name="message" ...

Then the JavaScript works again fine. Thanks for all your effort on this very good project! I contribute this fix to it.

Reply with quote

Advertisement

Guest

Real fix...

Oops, just found that you have some kind of an anti-spam code in your php that uses different textarea, so here is a more advanced fix:

Locate the places in source and add/do these changes in the script

...

<div id="pagebody">
<script language="JavaScript" type="text/javascript">
<!--
var current_message = null;
window.onload = function () {
if ((document.post.zprava1.style)&&(document.post.zprava1.style.display!="none")) {
current_message=document.post.zprava1;
} else if ((document.post.zprava2.style)&&(document.post.zprava2.style.display!="none")) {
current_message=document.post.zprava2;
} else if ((document.post.zprava3.style)&&(document.post.zprava3.style.display!="none")) {
current_message=document.post.zprava3;
} else if ((document.post.zprava4.style)&&(document.post.zprava4.style.display!="none")) {
current_message=document.post.zprava4;
} else if ((document.post.zprava5.style)&&(document.post.zprava5.style.display!="none")) {
current_message=document.post.zprava5;
}
}

// bbCode control by
// subBlue design

...

function checkForm() {

formErrors = false;

if (current_message.value.length < 2) {
//
if (document.post.message.value.length < 2) {
formErrors = "You must enter a message when posting.";
}

...

function emoticon(text) {
var txtarea = current_message; //document.post.message;

...

function bbfontstyle(bbopen, bbclose) {
var txtarea = current_message; //document.post.message;

...

function bbstyle(bbnumber) {
var txtarea = current_message; //document.post.message;

Reply with quote

Guest

Works fine

:D :) 8) :lol: :P :wink: :mrgreen:

Works flawless now!

Now if only there would be also old-style FTP in WinSCP, I already read + "signed" the petition for that in other thread... :wink:

Great work, WinSCP is the best piece of software I have seen so far on Windows.

Reply with quote

Advertisement

You can post new topics in this forum