3 Replies Latest reply on Feb 9, 2016 6:26 AM by rajarajanr71853199

    Profile Script - Element exists


      I'm trying to create a profile script that checks to see if an element on the current page exists. If the element exists then the code returns true. I'm having difficulty getting my code to work without getting the "element undefined" error. Does anyone have any tips to get this script to work? If accessing page elements through the profile script is not possible; I'm wondering if there is a way to profile users through an offer? Any help is appreciated.


      if (mbox.name == 'my_mbox'){ var hasClass = element.classList.contains('.mydiv'); if (hasClass === true) { return true; } }