This question has been flagged

Hello helpful forum!


I have created a pop-up message on a webpage, works great. By default this pop-up includes a button and the button is meant to hyperlink to whatever url the user defines. 

I want the visitor to stay on the same page after closing the pop-up, and my button serves as a confirmation that the visitor understands the message (psychology on the web;-)).

How can I create the button to just close the pop-up and visitor stays on the same page?


Looking forward to the replies -learning so much on this forum!!

Avatar
Discard
Best Answer

For popup, you are using the Modal..?

If you are using modal then try this...

https://getbootstrap.com/docs/4.0/components/modal/#modal-components

Avatar
Discard
Author

Thanks for the tip!! I have no knowledge of code, other than what I try to figure out in Odoo;-) So "Modal" doesnt ring a bell to me, but I do see that term in the code.

I did find the code for the part where the current "link button" is - but I wouldn't know how to apply your tip:

<div class="s_popup o_snippet_invisible" data-vcss="001" data-snippet="s_popup" id="sPopup1624438743861" data-invisible="1">

<div class="modal fade s_popup_middle modal_shown" style="display: none; background-color: var(--black-50) !important;" data-show-after="3000" data-display="afterDelay" data-consents-duration="1" data-focus="false" data-backdrop="false" tabindex="-1" role="dialog" aria-hidden="true">

<div class="modal-dialog d-flex modal-lg">

<div class="modal-content oe_structure">

<div class="s_popup_close js_close_popup o_we_no_overlay o_not_editable o_default_snippet_text" aria-label="Close">×</div>

<section class="s_banner pt96 pb96 o_colored_level oe_img_bg" data-snippet="s_banner" style="background-image: ...">

<div class="container-fluid">

<div class="row s_nb_column_fixed">

<div class="text-center jumbotron o_colored_level pt0 undefined o_cc o_cc2 pb48 col-lg-8 offset-lg-2" style="">

<h2>

<font style="font-size: 24px;">

<br/>

</font>

</h2>

<h2>

<font style="font-size: 24px;">There's no such thing as a free lunch

</font>

</h2>

<p class="lead">Products shown here, are displayed with a price of € 0,00  or with an indicative price only. No rights can be derived from this. <br/></p>

<p class="lead">Once you submit your 'shopping cart' for a quotation request, <br/>a customized quotation will be sent to you shortly. </p>

<a href="#" class="btn btn-primary mb-2" data-original-title="" title="" aria-describedby="tooltip516143">Got it!</a>

</div>

</div>

</div>

</section>

</div>

</div>

</div>

</div>

In your code, after this <div class="modal-content oe_structure"> tag, you need to add the

<div class="modal-header">

<h5 class="modal-title">Modal Title</h5>

<button type="button" class="close" data-dismiss="modal" aria-label="Close">

<span aria-hidden="true">&times;</span>

</button>

</div>

Author

Thank you Mehul Jadav for trying to help me but unfortunately it doesnt work ... I do think I copied exact your text into the code, but it isnt working, the button still does nothing.

And I just dont know where to look to even spot my own mistakes;-)

Thanks anyhow! Perhaps I was too ambitious thinking I could do this without any developer knowledge ...