Fórum

reloading a modal

Piña Kanpokaldean, modificado 8 Anos atrás.

reloading a modal

Junior Member Postagens: 79 Data de Entrada: 14/04/12 Postagens Recentes
Hi,

Still trying to get the modals right. I'm trying to set up a modal for my portlet that provides additional content about the items displayed, and I need to add previous/next functionality. The problem is that the modal is loading a JSP, so in order to load a different item I need to reload the page with different parameters. I've got the URL I need, but I don't know what target to set on the link in order to load that URL on the modal without reloading the main page. Is there some way of doing this?

Alternatively, I'm planning to load all items within the modal and set up a carousel. That is something I can do, but I'd prefer to avoid if possible.
thumbnail
Nate Cavanaugh, modificado 8 Anos atrás.

RE: reloading a modal

Junior Member Postagens: 94 Data de Entrada: 27/11/06 Postagens Recentes
Hi Piña,
If you're using a regular modal, you wouldn't be able to set an HTML element as a target of a link without a full page reload, but if you wanted to, you could do an ajax request and update the body of the modal in the success callback.

Hopefully that helps, but of course feel free to ask if you have any other questions emoticon
Piña Kanpokaldean, modificado 8 Anos atrás.

RE: reloading a modal

Junior Member Postagens: 79 Data de Entrada: 14/04/12 Postagens Recentes
Nate Cavanaugh:
Hi Piña,
If you're using a regular modal, you wouldn't be able to set an HTML element as a target of a link without a full page reload, but if you wanted to, you could do an ajax request and update the body of the modal in the success callback.

Hopefully that helps, but of course feel free to ask if you have any other questions emoticon


Thanks for the tip, unfortunately I won't have the chance to test it out as I already used the carousel approach. Turned out OK, although there were a couple of issues I'll leave them out as they don't belong here.

I should keep checking the forum more often. I tend to forget about it after a few days without replies and only come back later on when I have some other question and find the previous one answered. I feel bad for whoever took the time to answer when that happens.