cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

popup storefront

Former Member
0 Kudos
1,152

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.

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor
0 Kudos

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.

Answers (0)