Im going in circles here and the previous solutions i found on the forum dont seem to help neither does AI…
I have a SPA… Main page is INDEX
I have RE_NAV
I have RE_Home
I have an POP UP in RE_Home called PU_login/signup
When someone is logged out the users name in the RE_NAV is changed to “Login or Sign up”.
I want them to be able to click the text “Login or Sign up” in the RE_NAV and it show “PU_login/signup” from the RE_Home.
I’m trying to use custom states here and custom workflows but I keep hitting blocks where the RE’s wont reference the INDEX page or each other as I know they wont.
Here you can add whatever actions you need (i.e. showing the popup).
Then, in your other RE, when you want to call that JavaScript To Bubble element (and therefor trigger whatever actions are in the trigger workflow), just use a Run Javascript action with the following code:
bubble_fn_openPopup(); (openPopup being the unique suffix you gave the JavaScriptToBubble element - which can be anything you like).
Then, when you run that action from your RE, the javascript will ‘call’ the Javascript to Bubble element on your page, which will trigger the workflow to open the popup (or whatever your workflow does).
Thanks Adam, II must be missing a lot on how to do this because it still doesnt seem to work for me. Should there be conditionals and or custom states/ parameters to show and hide the elements?
I added the JS to bubble element on the index page and set it up as you did… called “openPopup” set to trigger event, I made the width and height 1 px each to hide it but its shown on the page.
The workflow should set done on the index page workflow tab right? -
I’m sorry Im very confused by on which RE to place what expression and what to add into the workflows and where to put a custom event and what that should be.
my setting this up in this way is not the best solution? would there be a better way while still using RE’s Should I make all the popup’s in one Generic popup and then show display them with states? or option set? URL parameters? but with states I’m back to the original issue of not being able to reference a state in another RE.