Forum Replies Created

Viewing 1 replies (of 1 total)
  • Okay I had the same error and this is how I fixed it.

    1) Open the editor.js file found in the \styles\prosilver\template folder

    2) Goto line 390
    This is what you should see:

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ;">');

    3) Change the code to this:

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ';">');

    The old code was missing a ‘ to open the last part of the table tag.

    4) Save this file and upload it back in to the \styles\prosilver\template folder

    Hope this helps,

    ————
    HOW IT WORKS:

    For those interested in learning more let me break it down so you can understand what is going on.

    If you break the code down into the open and close markers you can see really quick how the code is put together. We start with a document.write( command and then open a ‘ to start the code to create part of the table. we close the ‘ and add in the color tag which will be added by the script. So on and so forth this goes through the code, table code is in the ‘ ‘ marks and the script code is between the + + marks telling the browsers to add them all together.

    The problem in this code happens in the last section because the code hasn’t been opened with the proper ‘ (see bold section). It has the + color + but it is missing the ‘ to open the last bit of code to finish rendering the table properly.

    BAD CODE
    document.write(
    ‘<td bgcolor=”#’
    + color +
    ‘” style=”width: ‘
    + width +
    ‘px; height: ‘
    + height +
    ‘px; background-color: #’
    + color +
    ;”>’ <— Here is the problem
    );

    In the code below you can see what the correct code should look like when you break it apart the same way:

    GOOD CODE
    document.write(
    ‘<td bgcolor=”#’
    + color +
    ‘” style=”width: ‘
    + width +
    ‘px; height: ‘
    + height +
    ‘px; background-color: #’
    + color +
    ‘;”>’ <— Here is the solution
    );

    Technically the code is a simple table column format that can be simplified to looks like this: (The “X” represent the code that will be added by the script running on the board.)

    document.write(

    <td bgcolor=”#XXXXXX” style=”width: XXXpx; height: XXXpx; background-color: #XXX;”>

    ‘);

    The Bold sections below show you the parts of the code that will be generated by the script.

    document.write(‘<td bgcolor=”#’ + color + ‘” style=”width: ‘ + width + ‘px; height: ‘ + height + ‘px; background-color: #’ + color + ‘;”>’);

    I hope this helps fix the problems for some of you and helps explains how and why this works for you budding coders out there.

Viewing 1 replies (of 1 total)