WebSite X5Help Center

 
Kev G.
Kev G.
User

Modal  en

Author: Kev G.
Visited 771, Followers 1, Shared 0  

Hello again, on my current homepage I use a bootstrap modal that opens when a button is pressed. I have tried to simulate this on my Website X5 page but I cannot get the modal to close without refreshing the page. Is there something missing, or is there a similar addin in the Marketplace.

URL - http://www.slotcarsatleicester.co.uk/f1/index.html

Thanks.

Posted on the
4 ANSWERS
John S.
John S.
User

There is the animated button, but as it seem you have dynamic content in the modal, then it will not function directly.

I suggest you make the content for the modal as a X5 page. The page should be created without template.

Then you make a link to the page - could be by using the same button you have now.

Clicking the button should open the page in a showbox.

That should function kind of what you have now.

Read more
Posted on the from John S.
John S.
John S.
User

Forgot: The page should be a hidden page so it will not bother you in a menu.

Read more
Posted on the from John S.
John S.
John S.
User

Alternatively you could assign a function to the "close" button in the modal that actually closed the modal.

Read more
Posted on the from John S.
John S.
John S.
User

I suggest you skip all the code apart from the code needed to present the events on the new page.

- Make a hidden page without template.

- Use one of the X5 buttons and make a link to the new page.

- Make the link a showbox.

One of the advantages of X5 is, that it should be easy to use. If you have too much special code and you are not very familiar with coding, then it is best you use the functions available and combine them so it suits your need.

And then use special code where it is essential for the "thing" you want to have. 

Read more
Posted on the from John S.