Javascript call to trigger a fullscreen within a frameset

  • Hi,

    How can i get a fullscreen from a javascript function call ?

    here the details :
    i got a 3 rows frameset :my index.htm is calling :
    - ipadtop.html (header page)
    - pano.html (main frame krpano page)
    - ipadbottom.html (footer page)

    for specific reason (please don't ask why *wink* )
    i want a button in my ipadtop.html page to trigger the fullscreen event of krpano located in pano.html,
    then a javascript function call should be the answer...
    so how to do that ?

    Thanks *smile*

    zadda

  • well,
    i have found this thread :
    Javascript Fullscreen Function
    and with this example :
    http://www.krpano.com/examples/javascript2/

    could be closer to a solution :
    then if igot the javascript function :

    Code
    function fullscreen()
    	{
    		krpano().call( "switch(fullscreen);" );
    	}


    here i'm not sure in wich page i set up since that's a frameset, the index.html or the ipadtop.html (where the button should be) ?


    and the button link to call the function :

    Code
    <a onclick="fullscreen()"><img src="../../img/toplogo.png" width="50" height=24 "/></a>

    but i'm not sure how to target the html5 krpano currently loaded in central frameset (pano.html)
    may be something before krpano word :

    Code
    xxxxxx.krpano().call( "switch(fullscreen);" );

    Any help apreciated Folks *wink*

    zadda

  • we're talking about html 5 here..... *wink*

    No javascript needed , just simple open URL and target _blank or _parent.
    Just use the devices settings to make a separate duplicate for the html5 fullscreen link buttons.

    Here is an example with iFrame.
    http://www.360-foto.dk/sofia/

    Note that there may sometimes be some crashes on iPsd when returning to the initial startpage.
    This might be because of the memory usage may get too much as you load the same pano again in the frame.

    Hans

  • Sorry Hans you totally miss my point,


    Quote

    Note that there may sometimes be some crashes on iPsd when returning to the initial startpage.
    This might be because of the memory usage may get too much as you load the same pano again in the frame.


    this is mostly because you have 2 pano running with 2 loaded pages, instead of one single enlarging in fullscreen...or i 'm wrong,
    and with auto rotation On it can't help the Cpu


    may be Klaus has the answer ?

  • Well thats what I said. You may get more memory usage as loading the same pano in an iframe from a pano on a page may not be well controlled by iPad even if iPad has a very good memory control.

    But this is the only way you can do it properly.
    Using Javascript is just stupid as that in it self may use more processor.

    If you use parent you won't have 2 panos at same time but it seems not to help.

    Anyhow it is only every 3-4 time it crashes. and it never crash when you load the pano .
    Hans

  • That's pretty clever, I wish I'd though of it.
    How come the jump to fullscreen doesn't use parent?
    The more times you go to fullscreen you end up with left over start pages.

    No javascript needed , just simple open URL and target _blank or _parent.
    Just use the devices settings to make a separate duplicate for the html5 fullscreen link buttons.

    Here is an example with iFrame.
    http://www.360-foto.dk/sofia/

    Note that there may sometimes be some crashes on iPsd when returning to the initial startpage.
    This might be because of the memory usage may get too much as you load the same pano again in the frame.

    Hans

  • It is just because I am experimenting with both to find out what works best.
    I must say I can not figure out how iPad is handling all the pages it puts in the tabs. They are absolutely not in memory.

    I just got up to have 6 panoramas saved in the tabs and one open and still the memory usage showed 28mb free.
    Which was the same with just 1 open.

    Hans

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!