Skip to content

Forum in maintenance, we will back soon 🙂

Create Custom Tools...
 
Notifications
Clear all

Create Custom Tools on WordPress training module > Test Your Ajax Function Error

54 Posts
5 Users
12 Reactions
594 Views
 KB
(@knightyknight2)
Posts: 10
Active Member
 

I was hoping I could figure it out 😊 @admin but like you say, I'm learning!

 

Sure, the link is: https://techupstairs.com/a-good-test/

 
Posted : 06/22/2024 11:49 am
 KB
(@knightyknight2)
Posts: 10
Active Member
 

I did figure it out!  Now I have a different question.  🙂

 

How do you show the updated balance in the menu bar?  For some reason, it does not reflect the up to date balance until the user refreshes the screen.

 
Posted : 06/23/2024 11:14 pm
SSAdvisor
(@ssadvisor)
Posts: 1139
Noble Member
 

@knightyknight2 updating the values dynamically is done with the javascript; is it loaded properly?

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 06/24/2024 11:43 am
(@husein)
Posts: 527
Member Moderator
 

@knightyknight2 When something doesn't refresh until the user refreshes the screen, this would be solved by using Ajax in your code.

 
Posted : 06/24/2024 4:16 pm
Hasan Aboul Hasan
(@admin)
Posts: 1247
Member Admin
 

@knightyknight2 I shared the codes, and my header template.

the points balance element ID should match the ID in the JS code.

 
Posted : 06/24/2024 4:58 pm
SSAdvisor reacted
 KB
(@knightyknight2)
Posts: 10
Active Member
 

Thanks @ssadvisor , @husein , @admin!  I am using Divi so I need to check the JS.  

 
Posted : 06/26/2024 12:04 am
 KB
(@knightyknight2)
Posts: 10
Active Member
 

I went back to the Header lecture but did ot see the JS.  Did I overlook it?

 
Posted : 06/26/2024 12:13 am
Hasan Aboul Hasan
(@admin)
Posts: 1247
Member Admin
 

@knightyknight2 The JS code is in the tools code and not the header, 

I shared the header template for elementor.

if you are using another builders, you just need to set the CSS selector ID for the element the holds the balance so it can be accessed from the tool's JS code.

 
Posted : 06/26/2024 3:21 am
SSAdvisor reacted
 KB
(@knightyknight2)
Posts: 10
Active Member
 

Ahhh....ok got it.  I'll check thaat.  Thank you so much @admin !!

 
Posted : 06/26/2024 1:10 pm
Page 4 / 4
Share:
build ai agents ad