How to refresh the parent page in HTML, especially via Vert.X

Viewed 19

I have a nested HTML page as:

<html>
    <body>
        <div class="container">
            <nav class="item_list">...</nav>
            <article id="item_details">
                <object type="text/html" data="detailsPage?key=document1">
                    <html>...</html>
                </object>
            </article>
        </div>
    </body>
</html>

Inside the main div (class="container") there's a item list on the left (nav class="item_list"). On the right side, it is an article with id item_details. Inside the article, it is a nested html page which shows the details of a selected item. In the nested html page, there's a form to add new item or delete an existing item. This action needs to refresh the nav part. So my question is - how to refresh the nav part in response of a button click from the nested HTML page? More specifically, I'm using Vert.x as my server application toolkit, it the resolution is by Vert.X, it will be much more helpful. Thanks in advance.

1 Answers

refresh the nav part in response of a button click from the nested HTML page?

  1. Attach a button click listener as a javascript function
  2. In that function make a request to your vert.x backend with the appropriate data
  3. Return the new nav response you want from your vert.x backend
  4. Use that data in javascript to refresh the nav part

Ps This has nothing to do with vert.x and is regular webapp design patterns

Related