0

how could I open the contents of an external php file within this modal?

// Demo modal
    function openplaylist()
    {
        $.modal({
            content: 'modal content'+
                      '</ul>',
            title: 'Playlist',
            width: 300,
            scrolling: false,
            actions: {
                'Fechar' : {
                    color: 'red',
                    click: function(win) { win.closeModal(); }
                },

            },
            buttons: {
                'Fechar': {
                    classes:    'huge blue-gradient glossy full-width',
                    click:      function(win) { win.closeModal(); }
                }
            },
            buttonsLowPadding: true
        });
    };

Did i open the file "manage-playlist.php" within this modal. is it possible?

1 Answer 1

1

Yes, you can just download your page first and then open modal:

function openplaylist()
{
    $.get('manage-playlist.php', function(data) {
        $.modal({
            content: data,
            title: 'Playlist',
            width: 300,
            scrolling: false,
            actions: {
                'Fechar' : {
                    color: 'red',
                    click: function(win) { win.closeModal(); }
                }

            },
            buttons: {
                'Fechar': {
                    classes:    'huge blue-gradient glossy full-width',
                    click:      function(win) { win.closeModal(); }
                }
            },
            buttonsLowPadding: true
        });
    });
}
Sign up to request clarification or add additional context in comments.

2 Comments

does not work :/ .. my Javascript does not work After putting " $.get('manage-playlist.php', function(data) { $.modal({ content: data, "
Fixed some syntax a bit, please update. Can you show me a page where you're testing this script if it's still does not work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.