-1

Sorry my English, I am of another nationality

I have a code in js but unfortunately it does not work because of this warning How to fix it and make it work, thank you

You're right, excuse me, here's the full code, i included this script in phpBB 3.1

These are the affected files

1) overall_footer_after.html

2) overall_header_page_body_before.html

3) scrollamp.js

1) In overall_footer_after.html and loaded the scrollamp.js file this way

<!-- INCLUDEJS scrollamp.js -->

2) This is the code I put in the file: overall_header_page_body_before.html

<div class="forabg">
    <div class="inner">
        <ul class="topiclist">
            <li class="header"><dl><dt>News</dt></dl></li>
        </ul>
            <div class="postbody" style="width: 100%">              
                <div class="post bg2">
<div class="avviso" style="padding: 0px; width: 400px; height: 200px; margin: 0 auto 0 auto;text-align:center; border: #00ffff 0px solid;">
<script type="text/javascript">
innerHTML()
</script>
</div>
                    </div>
                </div>
            </div>
    </div>

3) And this is the code I put in the file scrollamp.js

function innerHTML() {
document.write("<marquee width\"400\" height\"200\" direction=\"Up\" scrollamount=\"1\" scrolldelay=\"1\">");
document.write("<p style=\"font-size:25px;font-weight: bold;color:red;text-align:center;text-decoration:underline blink;\">.:| AVVISO IMPORTANTE |:.<\/p>");
// document.write("<br\/>");
document.write("<p style=\"font-size:15px;font-weight: bold;color:#000;text-align:center;\">Tutti gli Utenti Registrati, dovranno effettuare almeno 5 messaggi per visualizzare tutto il forum<\/p>");
document.write("<\/marquee>");
}

1 Answers1

0

I am trying to be nice so I will answer your question. However, PLEASE DON'T EXPECT PEOPLE TO ANSWER SUCH AN AMBIGUOUS QUESTION.
You have not provided your full html code so no one can give any actual suggestion to you.

Here is what I suspect your problem might be:

Your javascript file is fine but you need to import it before using it.

ReferenceError: writeHTML is not defined

This kind of error will only be thrown when, literally, the object has not yet been defined i.e. you have not imported it yet.

To import a script do this:

<script src="fileName.js"></script>

Thats all I could tell from the informations you have provided.

ed9w2in6
  • 133
  • 7