Expand my Community achievements bar.

Mbox content does not update on immediate page load

Avatar

Level 1

I have created an mbox using mboxCreate().

Whenever I change parameters, the content does not change immediately on page load.

Only after 2-3 refreshes, I am shown the correct data.

Following is the code snippet.

<script>

    window.onload = function(e){

          var cat = gup('category', location.href);

          mboxCreate("testMBox","profile.name="+cat);

          function gup( name, url ) {

            if (!url) url = location.href;

            name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

            var regexS = "[\\?&]"+name+"=([^&#]*)";

            var regex = new RegExp( regexS );

            var results = regex.exec( url );

            return results == null ? null : results[1];

        }

        }

</script>

The data is to be fetched from custom criteria defined in Target Recommendations.

I am using "at.js".

I am new to adobe target recommendations.

Thanks in advance.

0 Replies