Contact Admin

Error messages in browser debug window? - Contact Admin

Error messages in browser debug window?

by nou nou » Fri Mar 23, 2018 3:44 am

Hello,


Testing this extension - on the contact page as soon as click in the message body field, I get the folowing error in my browser (Chrome):

Code: Select all

Uncaught ReferenceError: initInsertions is not defined
    at HTMLTextAreaElement.onfocus (contactadmin:411)
onfocus @ contactadmin:411
contactadmin:411 Uncaught ReferenceError: storeCaret is not defined
    at HTMLTextAreaElement.onkeyup (contactadmin:411)
onkeyup @ contactadmin:411
The extension works totally fine, however.

Any thoughts?
nou nou
Registered User
Posts: 361
Joined: Sat Oct 29, 2016 8:08 pm
Contact:

Re: Error messages in browser debug window?

by RMcGirr83 » Fri Mar 23, 2018 8:33 am

Version you are using and a link would probably help as well.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error messages in browser debug window?

by nou nou » Sat Mar 24, 2018 2:53 am

1.1.4, phpBB 3.2.2

Put up a quick test board for you to see:

[temporary link removed - answer below]
Last edited by nou nou on Sat Mar 24, 2018 2:23 pm
nou nou
Registered User
Posts: 361
Joined: Sat Oct 29, 2016 8:08 pm
Contact:

Re: Error messages in browser debug window?

by RMcGirr83 » Sat Mar 24, 2018 9:08 am

As you said doesn't really affect the form working or not but if it bothers you find this line in the html file within the extension

Code: Select all

<dd><textarea name="message" id="message" class="inputbox" tabindex="6" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" style="width:98%;height:160px;">{CONTACT_MESSAGE}</textarea></dd>
and change it to this

Code: Select all

<dd><textarea name="message" id="message" class="inputbox" tabindex="6" style="width:98%;height:160px;">{CONTACT_MESSAGE}</textarea></dd>
Those javascript things are for smilies and bbcodes which, obviously, aren't being used in the form.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Error messages in browser debug window?

by nou nou » Sat Mar 24, 2018 2:25 pm

Great! Thank you very much! :)
nou nou
Registered User
Posts: 361
Joined: Sat Oct 29, 2016 8:08 pm
Contact: