MX Modals do not work.
2 years ago
2 years ago
#1
Been following the mx tutorial, and I decided to try and use mx-modal but it does not show up on the page. I even tried the sample code from the docs. No modal shows up. Using Chrome on win11.
2 years ago
#2
Hi,
I'll look into this immediately. Hang on.
I'll look into this immediately. Hang on.
2 years ago
#3
i get this error in the console:
ReferenceError: openModal is not defined
at buildMXModal (trongate-mx.js:205:5)
at initInvokeHttpRequest (trongate-mx.js:136:13)
at HTMLBodyElement.handleTrongateMXEvent (trongate-mx.js:1069:9)
ReferenceError: openModal is not defined
at buildMXModal (trongate-mx.js:205:5)
at initInvokeHttpRequest (trongate-mx.js:136:13)
at HTMLBodyElement.handleTrongateMXEvent (trongate-mx.js:1069:9)
2 years ago
#4
Do you have a function openModal(modalId) in public/js/admin.js?
2 years ago
#5
This was being caused because the page did not include:
...before the closing 'body' tag. It's my fault for not mentioning that. I apologise.
DON'T WORRY.
I'm currently fixing Trongate MX so that you do NOT need to include app.js. This will all work in five minutes. Hold on!
...before the closing 'body' tag. It's my fault for not mentioning that. I apologise.
DON'T WORRY.
I'm currently fixing Trongate MX so that you do NOT need to include app.js. This will all work in five minutes. Hold on!
2 years ago
#6
Okay, I have now updated Trongate MX so that you no longer need to include app.js on your pages for it to work.
Please use the very latest of Trongate MX, if you can, and we should be good. You can get it from the Trongate repo at: https://github.com/trongate/trongate-framework .
As a reminder, the file you want is called 'trongate-mx.js' and it is stored inside the 'public' directory.
Ahoy!
Please use the very latest of Trongate MX, if you can, and we should be good. You can get it from the Trongate repo at: https://github.com/trongate/trongate-framework .
As a reminder, the file you want is called 'trongate-mx.js' and it is stored inside the 'public' directory.
Ahoy!
2 years ago
#7
Work good.
Thank you DC. You rock.
Thank you DC. You rock.