Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Auto-refresh CB Content after Ajax field is updated

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 5 months ago - 11 years 5 months ago #226890 by dotcom22
hello

I created a "welcome" CB content module with some text inside and also with a rendered Tab. In this Tab, I placed only one Ajax yes/no radio field. When user update this Ajax field, I would like perform a module refresh only and not a full page refresh. I suppose is possible maybe using the Javascript section of CB content ? If yes how ?

Here why I need to make this:

- I setup my radio field with a placeholder "Do you want hide this module?".

- Then I Setup a Tab condition who must hide the Tab if the radio value is Yes.

- So when user click on placeholder, the yes/no radio is displayed and when he choose "Yes" and confirm, the value Yes appear (who is annoying) but the module still visible.

- Is only if I refresh the full page the module disappear...

any clue ?

Maybe is possible to do that in another manner but is the only one I found..that mean hide a module only if user decide by himself to do and without a full page reload.

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 11 years 5 months ago by dotcom22.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226905 by krileon
The module would need to have Ajax response capability built in and you'd need to trigger it or Ajax call to it and handle the response if it did. At most you could add jQuery to the header that checks if the field is changed to Hide then use jQuery to remove the module from the DOM, but it won't work in the reverse to Show it unless you always show it and just hide it with strictly CSS then use jQuery to show/hide as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 5 months ago #226909 by dotcom22
My goal is just to hide and never show again.

Could you tell me how to do in practice please ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226916 by krileon
I suggest just dealing with the reload then otherwise you're adding unnecessary overhead to your site adding the jQuery.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 5 months ago - 11 years 5 months ago #226946 by dotcom22
ok however I tried many thing but I don't see even how to auto-reload the page after edit radio value to Yes. I tried also to setup an auto-action but without success.. Due to the fact the radio value appear with ajax, I don't see how to fire auto-reload..

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 11 years 5 months ago by dotcom22.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago #226947 by krileon
You'll need to add jQuery to the header using a Code action with jQuery method that checks for the field to change. When it does do a reload or use jQuery to remove the module from the DOM. If this is on profile view you should be able to use the profile display triggers (believe there's a before and after trigger, either should work).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum