Hello,

I use Prototype & script.aculo.us (latest version) on a fluxbb forum
to have autocomplete and autorefresh feature.
The problem is that when i display a smiley bar with an other
javascript function, i get many error messages on apache log.

Here is an example on error message :
[Fri Nov 05 03:07:18 2010] [error] [client 66.131.132.226] (20024)The
given path is misformatted or contained invalid characters: access to /
img/smilies/function (_58) {    var _59 = true;    this.each(function
(_5a, _5b) {_59 = _59 && !!(_58 || Prototype.K)(_5a, _5b);if (!_59)
{throw $break;}});    return _59;} failed

The function wich cause the error is : tb.barSmilies(smilies);
Here is the function :
        function btSmilies(img, label)
        {
                addButton(img, label,
                        function() {
                                var element = 
document.getElementById('smilies');
                                if (element.style.display == 'block' )
                                {
                                        textarea.focus();
                                        element.style.display = 'none';
                                }
                                else
                                {
                                        textarea.focus();
                                        element.style.display = 'block';
                                }
                        });
        }

And the addButton function :
        function addButton(src, title, fn)
        {
                var i = document.createElement('img');
                i.src = bt_img_path + src;
                i.title = title.replace(/"/g, '"');
                i.style.padding = '0 5px 0 0';
                i.onclick = function() { try { fn() } catch (e) { } return 
false };
                i.tabIndex = 400;
                toolbar.appendChild(i);
        }

Every function are in an other with begin by :
function toolBar(textarea, bt_img_path, smilies_img_path)
{
        if (!document.createElement)
                return;

        if ((typeof(document['selection']) == 'undefined')
        && (typeof(textarea['setSelectionRange']) == 'undefined'))
                return;

        var toolbar = document.createElement('div');
        toolbar.id = 'toolbar';
        toolbar.style.padding = '4px 0';

        var smilies = document.createElement('div');
        smilies.id = 'smilies';
        smilies.style.display = 'none';
        smilies.style.padding = '0.3em 0';


I really don't understand how Prototype & script.aculo.us can cause
this error.
And i'm sure it come from Prototype & script.aculo.us and these
functions.
Because when i remove my script call to Prototype & script.aculo.us,
there is no more errors, and it's the same when i comment btSmilies
function.

Could you help me to correct the problem please ?

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to