Advancedform & ModalBox

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

cmb
Posts: 12877
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Advancedform & ModalBox

Post by cmb » Sun Jun 03, 2018 3:39 pm

After clicking on “Predbežná objednávka” on http://rancdubina.cmsimple.sk/?Kontakt, I get in Chrome:
Uncaught SyntaxError: Unexpected token )
Apparently, that refers to this line generated by the Tooltip plugin:

Code: Select all

$('.tooltip').attr('href','javascript:void();');
which should be

Code: Select all

$('.tooltip').attr('href','javascript:void(0);');
However, using javascript: URIs is generally frowned upon, see e.g. https://www.jibbering.com/faq/#javascriptURI.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

frase
Posts: 2261
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: Advancedform & ModalBox

Post by frase » Sun Jun 03, 2018 3:54 pm

Die Maskierung der Anführungszeichen in den Scripts ist nicht nötig bzw. sogar hier falsch.
z.B in Zeile 352

Code: Select all

text: '<div><div id=\"xh_mailform\"></div><form class=\"xh_mailform\" action=\"/? ...
oder in Zeile 434:

Code: Select all

text: '<h4>Predbežná objednávka</h4><div><div class=\"advfrm-mailform\"><form name=\"preorder\" action=\"/?Kont ...

Tata
Posts: 2852
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Advancedform & ModalBox

Post by Tata » Sun Jun 03, 2018 4:14 pm

Die Maskierung müsste der Editor machen. Ich habe es jedenfalls nicht so reingegeben. Oder ist es von Plugins selbst so?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

frase
Posts: 2261
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: Advancedform & ModalBox

Post by frase » Sun Jun 03, 2018 4:18 pm

Das kommt sicher direkt vom Plugin.
Keine Sorge, das scheint kein Problem zu sein. (Obwohl hier die " unmaskiert richtiger wären)
Ich war nur gerade auf der Suche nach Fehlern ... ;-)

cmb
Posts: 12877
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Advancedform & ModalBox

Post by cmb » Sun Jun 03, 2018 8:54 pm

frase wrote:
Sun Jun 03, 2018 3:54 pm
Die Maskierung der Anführungszeichen in den Scripts ist nicht nötig bzw. sogar hier falsch.
z.B in Zeile 352

Code: Select all

text: '<div><div id=\"xh_mailform\"></div><form class=\"xh_mailform\" action=\"/? ...
oder in Zeile 434:

Code: Select all

text: '<h4>Predbežná objednávka</h4><div><div class=\"advfrm-mailform\"><form name=\"preorder\" action=\"/?Kont ...
This escaping is caused by the addslashes() call at the end of function tooltip_get_page(), and escaping the double-quotes is fine here (i.e. for JavaScript) – it would be an error for single-quoted PHP strings, though. However, I prefer to pass PHP values to JS via json_encode().
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

Post Reply