call a variable from another jsp file

Asked 2 years ago, Updated 2 years ago, 139 views

How can I call the variable dialog in the javascript part of the jsp file below from another jsp?

vardialog=Liferay.Util.Window.getWindow(
    {
        Dialog: {
            align: {
                node —null,
                points: ['tc', 'tc' ]
            },
            constrain2view:true,
            cssClass: 'profile-dialog',
            destroyOnClose: true,
            modal —true,
            feasible: false,
            width —1060
        },
        cache: false,
        id: '<portlet:namespace/>scheduleDialog',
        refreshWindow:window,
        title: '<h4class="modal-title"><img src="<%=imageFolderPath%>/icon01.png" alt="<liferay-ui:message key="edit-schedule"/"/gt;'
            + template.replace('_PLACE_HOLDER_',dispName)+'</h4>',
        uri —url
    }
    );

javascript jsp

2022-09-30 21:43

1 Answers

JavaScript runs on a client (on a browser) and JSP runs on a server (a servlet container), so variables in JavaScript cannot be referenced by JSP.


2022-09-30 21:43

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.