on 2018 Dec 11 8:04 PM
Hy everybody.
I've created a new popup in storefront (hybris 6.7). To do that I've created a new tag and a jsp makes a call to this tab.
The thing is that it works fine except that when loading popup in a js file I have this code:
ACC.colorbox.open(
$(this).data("cboxTitle"),
{
When popup is loading all data is correct except that I get a field "unknown" and it's the result for this.data("cboxTitle).

Even if I have no data in jsp file I get this message. It's a similar code like in "acc.forgottenpassword.js" but in this case it works fine. From where it shows that "cboxTitle".
Thanx a lot.
Request clarification before answering.
It ( cboxTitle ) is referring data-cbox-title in hybris/bin/ext-template/yacceleratorstorefront/web/webroot/WEB-INF/tags/responsive/user/login.tag as written in the following code:
<a href="#" data-link="<c:url value='/login/pw/request'/>" class="js-password-forgotten" data-cbox-title="<spring:theme code="forgottenPwd.title"/>">
Let's say you have the following HTML-Markup,
<div id="element" data-foo-bar="5">Element</div>
the following JavaScript will assign 5 to the variable, x
var x=$('element').data('fooBar');
You can find an example at http://api.jquery.com/data/#data-html5 where you will see that $( "div" ).data( "lastValue" ) === 43; returns true.
I hope it is clear.
Best regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.