none
Open different webpages in a flyout RRS feed

  • Question

  •  

    Hello everybody,

     

    I've found a code to open a webpage in a flyout:

    _________________________________________________________________________________________

    gadget.html:

    <html>
    <head>
    <script language="javascript">
    System.Gadget.Flyout.onShow = flyoutShowing;
    System.Gadget.Flyout.file = "flyout.html";
    var url = "";


    function setFlyout(urltmp)
    {
        url = urltmp;
        System.Gadget.Flyout.show = true;
    }


    function flyoutShowing()
    {
        System.Gadget.Flyout.document.parentWindow.frame.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url+"'></iframe>";
    }
    </script>
    </head>
    <body style="width:150px; height:150px; margin:0px;" onclick=setFlyout('http://www.microsoft.com')">
    </body>
    </html>

    flyout.html:

    <html>
    <body style="width:500px; height:500px">
    <div id="frame"></div>
    </body>

    </html>
    _____________________________________________________________________________________________

    But this code is for 1 webpage, I want open more webpages. For example i have 3 webpages in a gadget: www.google.com, www.msn.com, www.yahoo.com. So, if i click on www.google.com, i want that google.com opens in the flyout. And if I click on www.msn.com, I want that msn.com opens in the flyout. Is this possible?

     

    Thanks,

    Ben

    Saturday, May 24, 2008 2:58 PM

Answers

  • Create three frames.  eg.

    function flyoutShowing()
    {
        System.Gadget.Flyout.document.parentWindow.frame1.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url1+"'></iframe>";
        System.Gadget.Flyout.document.parentWindow.frame2.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url2+"'></iframe>";
        System.Gadget.Flyout.document.parentWindow.frame3.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url3+"'></iframe>";
    }



    flyout.html:

    <html>
    <body style="width:500px; height:500px">
    <div id="frame1"></div>
    <div id="frame2"></div>
    <div id="frame3"></div>
    </body>

    </html>



    Sunday, May 25, 2008 8:17 AM

All replies

  • Create three frames.  eg.

    function flyoutShowing()
    {
        System.Gadget.Flyout.document.parentWindow.frame1.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url1+"'></iframe>";
        System.Gadget.Flyout.document.parentWindow.frame2.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url2+"'></iframe>";
        System.Gadget.Flyout.document.parentWindow.frame3.innerHTML = "<iframe width='500' height='500' frameborder='0' src='"+url3+"'></iframe>";
    }



    flyout.html:

    <html>
    <body style="width:500px; height:500px">
    <div id="frame1"></div>
    <div id="frame2"></div>
    <div id="frame3"></div>
    </body>

    </html>



    Sunday, May 25, 2008 8:17 AM
  • I can't get it working. Can you maybe do it? It's a gadget for my school. There are in the gadget 8 links, but only the ".../maandag" (Monday), the ".../dinsdag" (Tuesday), the ".../woensdag" (Wednesday), the ".../donderdag" (Thursday), and the ".../vrijdag" (Friday) link must be open in the flyout. I hope you want do it, that would be great!

     

    Here is the link with the files: gadget.zip

     

    Thanks,

    Ben

    Sunday, May 25, 2008 10:10 AM