Web panel should have a reset or home shortcut

Web panels are wonderful, and are even interactive so you can go wherever it happens links make you go. But if you go to a dead end, i.e. a totally different page the panel appear substantially frozen on that link. There should be a shortcut restoring the inizial page. Sometimes referred as home url. Maybe there is and I have missed it. The only way I found is to totally logout and reentering the domain, this way the link appears reset, but it is quite cumbersome.

The best uses for the web panels is web pages that intentionally don’t have such dead ends, or are single page. This is the reason that there aren’t any controls to be able to reset etc, as they are often used in ways to not always look like a web page.

A reset button/link/function could be added to a web panel via script though, or even easier you could wrapper the web page with an iframe that has a reload button in the outer.

Ok, is there a quick dirty example of the second easiest way for doing that?

Apologies, only just spotted your reply. The following code for a web page wrapper would technically work:

<html>
    <body style="margin:0px;padding:0px;overflow:hidden; margin-top: 25px;">
        <div style="position: absolute; top: 0px;">
            <button
                onclick="document.getElementById('browserFrame').src = document.getElementById('browserFrame').src;">Refresh to home</button>
        </div>
        <iframe id="browserFrame" src="http://www.vircadia.com" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%"></iframe>
    <body>
</html>

This is an extremely quick and dirty example which can be made much nice looking with just some additional styling. The main drawback is not all webpages support being loaded within an iframe, so obviously test first.

Hi forgive me for my dumbness on javascript/qt, I know how to enable the web panel via create interface, but dont know how to insert a web wrapper. I only have this on the entity handling


Is that html script something I have to put in a script and then setting the scriptURL accordingly?
Or this is something you have to do with a completely new javascript file creating the entity and then joining that html code? Or does this require .qm ?

Ah sorry for not being clear. You would need to host that webpage, and update the IFRAME url in the HTML source to point to the correct URL. Then use the url of your hosted wrapper page as the web entity source. If I get chance, I’ll try put together a nice easy way to do it

1 Like