modal dialog

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

modal dialog

Postby Otto » Sat Jan 15, 2022 5:28 am

I write down what problems I faced with the modal dialog.

HTML 5 modal dialog on modal dialog is not supported

Autocomplete
Autocomplete Appearing behind the Modal popup

https://stackoverflow.com/questions/223 ... odal-popup
Thanks, I upvoted because this solved my problem within seconds of searching for a solution. You can use an element's ID in the appendTo option like so appendTo: "#your_element_id".

Code: Select all  Expand view


    <p>Modified Behavior<br>
    <input id="autocomplete2" type="text" placeholder="U.S. state name">
    <input id="autocomplete2-value" type="text" name="code"></p>
<script>
    /*
     * jQuery UI Autocomplete: Using Label-Value Pairs
     * https://salman-w.blogspot.com/2013/12/j ... mples.html
     */

    var data = [
        { value: "AL", label: "Alabama" },
        { value: "AK", label: "Alaska" },
        { value: "WI", label: "Wisconsin" },
        { value: "WY", label: "Wyoming" }
    ];
    $(function() {
        $("#autocomplete2").autocomplete({
            source: data,
            focus: function(event, ui) {
                // prevent autocomplete from updating the textbox
                event.preventDefault();
                // manually update the textbox
                $(this).val(ui.item.label);
            },
            select: function(event, ui) {
                // prevent autocomplete from updating the textbox
                event.preventDefault();
                // manually update the textbox and hidden field
                $(this).val(ui.item.label);
                $("#autocomplete2-value").val(ui.item.value);
            },
            appendTo: "#editModal"

        })
       
    });
</script>


 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: modal dialog

Postby Antonio Linares » Sat Jan 15, 2022 9:57 am

Dear Otto,

First solution here seems to work fine: (run the provided code snippet button in the solution)
https://stackoverflow.com/questions/19528173/bootstrap-open-another-modal-in-modal
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: modal dialog

Postby Otto » Sat Jan 15, 2022 1:50 pm

Dear Antonio,

It seems that this example is with
Bootstrap 5 (beta). Here it is still working.

Ruth tested with the release, and she also found a link where they tell that it is not supported anymore.

For the new WINHOTEL online we changed all the LIBs to the latest one and try to start as clean as possible: your mod harbour - jquerry and bootstrap and all with the most updated versions.

Now she changed the modal dialog to a collapse which is working fine.

We are also trying an autocomplete input. This seems even better and more Fivewin like.


Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 11 guests