Refresh CSS Conditionals from an HTML...

User 2690548 Photo


Registered User
21 posts

Looking for a way to trigger the CSS Refresh of the conditionals ("Show Element"), which I'm pretty sure is handled by conditionals.js.

This functionality is already built in to WFB -- click a radio button, elements hide & show. But I'm not clicking, I'm setting the radio button from a button created within an HTML element. The button's used to simulate page navigation & to scroll to top.

I should be able to simply call the WFB js function, I just can't figure out the function I need to call and the parameters to send. I believe the refresh isn't happening automatically because the action is not being performed by an "fb-xx" element (where the js checks for #docContainer).

My latest failed attempt, I put the HTML element button within <div> tags and set the class as fb-radio -- no workee, but at least it got the button to trigger conditionals.js, but I get a ReferenceError for an undefined parameter.

If it's possible, I think the trick might be to set the radio button to 'this', and call the function 'as' the radio button - the function called would be the radio button setting the value of itself, and all else would automagically happen. I think I can, I think I can... maybe? Makes sense to me, but I'm rather simple.


Here's a link to a sample version on the web -- "navFront" is the button:
http://sumpterconstructionllc.com/CC/TEST1.php?1234321
(Test stuff for this is the bottom half, "Below is a radio button" on down... and the CSSREFRESH button is to keep the code separated from the working NavFront for testing).
Here's the .fb:
http://sumpterconstructionllc.com/CC/Temp/Test1.fb
User 2690548 Photo


Registered User
21 posts

Will still dig in to this when I have a chance, but for now I'll just set the navigation radio button value with a good old-fashioned click to hide/show the elements. I've added a 'scroll to top' button that, at least, will get the user to the top of the 'next' page.

Will keep my eye on this thread, or will post here if I find a solution.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.