Hi, I have an issue with the expand/collapse text code. When I add the copied code there are errors as the text is red, please help!

Hello janesneddon58,

yes of course you will get ERRORS when you just do COPY&PASTE.

Do you have already the “readMoreButton” on your stage/page?
Did you already have changed the ID of your “MULTI-STATE-BOX” ???
Do you have already the “readLessButton” on your stage/page?

You just pasted come code into your webpage, with the hope everything starts working automatically. This will never work like that!!! :grin:

You have to MODIFY your CODE right now, or MODIFY your ELEMENTS (element-IDs) !

Hi, thanks for responding.

I haven’t just copied code into the page, I do have a little more understanding than that.

I have the collapsed text, the read more button, the extended text and the read less button all set up. As this is my first attempt to make things easier everything is named as per the Corvid help page. This is why I copied over their code.

On the live page I have the collapsed text and the read more button, but when the button is clicked nothing happens.

I see in the code it refers to a ReadMoreStatebox, but in the instructions this is not mentioned so I assume this is where the error is, but I don’t know how to resolve the issue.

Any further help appreciated.
Jane

Hello again :grin:,

your MULTI_STATE_BOX has the ID → “statebox1” !!!
Your CODE is searchig for a MULTI-STATE-BOX with the ID “readMoreStatebox” !

And what is happening with your buttons, i do not know, because i can’t see them on the pic.

But i assume they also have the wrong ID (surelly calles “button1” or something like that) :grin:

To be more informed, you can also hover over the 4-little red buttons which shows you the error-lines. Hover over them and take a look, what they are trying to tell you.

How to work with “multi-state-boxes” you will see here…
https://russian-dima.wixsite.com/meinewebsite/multistate-boxes

And how to work with some button-actions here…
https://russian-dima.wixsite.com/meinewebsite/working-with-buttons

Thank you, I’ll take a look at this.

In the “multistate-boxes”-example you will find 2 different ways, how to fire up an event.