Loading ...
Sorry, an error occurred while loading the content.

iframes inside a tab view are reloaded on 'back button in Firefox

Expand Messages
  • aniad
    I have a tab control where each tab has an iframe. The content of the iframe is dynamic depending on what else was selected on the page. When a tab is
    Message 1 of 6 , Sep 3 4:53 PM
    • 0 Attachment
      I have a tab control where each tab has an iframe. The content of the
      iframe is dynamic depending on what else was selected on the page.
      When a tab is selected it loads some url into the iframe.

      On Firefox hitting the back button reloads the iframe in some peculiar
      way that it wipes out its content (I do nothing to monitor or act on
      the browser's back button).

      Here is code which shows this problem. After showing the page, select
      one of the tabs so that the iframe is loaded, then hit Firefox's back
      button.

      Ania.

      <script>
      var yahooTab =
      { label: "Yahoo!",
      id: "yahooId",
      content: '<div style="height:500px">' +
      '<iframe id="yahooIdFrame" name="yahooIdFrame"
      width="100%" height="100%" src="" >foo</iframe>' +
      '</div>'
      };

      var googleTab =
      { label: "Google!",
      id: "googleId",
      content: '<div style="height:500px">' +
      '<iframe id="googleIdFrame" name="googleIdFrame"
      width="100%" height="100%" src="" >foo</iframe>' +
      '</div>'
      };

      var gTabView;

      function init()
      {
      gTabView = new YAHOO.widget.TabView('tabsDiv');
      gTabView.addTab ( new YAHOO.widget.Tab ( yahooTab ) );
      gTabView.addTab ( new YAHOO.widget.Tab ( googleTab ) );

      gTabView.subscribe("activeTabChange", tabSelected );
      }

      function tabSelected( eventInfo )
      {
      var src = "about:blank";
      var newTabId = eventInfo.newValue.get("id");
      if ( newTabId == "yahooId" )
      src = "http://www.yahoo.com";
      else if ( newTabId == "googleId" )
      src = "http://www.google.com";

      document.getElementById(newTabId+"Frame").src = src;
      }

      YAHOO.util.Event.onDOMReady(init);

      </script>

      <body class=" yui-skin-sam">

      <div id="tabsDiv" class="yui-navset"/>

      </body>
      </html>
    • Dav Glass
      The issue is that you are creating the iframe without a src, which logs a history entry, then you are changing that src, which logs a different history entry..
      Message 2 of 6 , Sep 5 1:31 PM
      • 0 Attachment
        The issue is that you are creating the iframe without a src, which logs a history entry, then you are changing that src, which logs a different history entry..

        Why don't you just put the src in when you generate the tab instead of changing it on every tab change?

        Dav


         
        Dav Glass
        dav.glass@...
        blog.davglass.com



        + Windows: n. - The most successful computer virus, ever. +
        + A computer without a Microsoft operating system is like a dog
        without bricks tied to its head +
        + A Microsoft Certified Systems Engineer is to computing what a
        McDonalds Certified Food Specialist is to fine cuisine +


        ----- Original Message ----
        From: aniad <aniad@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Wednesday, September 3, 2008 4:53:43 PM
        Subject: [ydn-javascript] iframes inside a tab view are reloaded on 'back button in Firefox

        I have a tab control where each tab has an iframe.  The content of the
        iframe is dynamic depending on what else was selected on the page.
        When a tab is selected it loads some url into the iframe.

        On Firefox hitting the back button reloads the iframe in some peculiar
        way that it wipes out its content (I do nothing to monitor or act on
        the browser's back button).

        Here is code which shows this problem.  After showing the page, select
        one of the tabs so that the iframe is loaded, then hit Firefox's back
        button.

        Ania.

        <script>
        var yahooTab =
        {  label: "Yahoo!",
            id: "yahooId",
            content: '<div style="height:500px">' +
                        '<iframe id="yahooIdFrame" name="yahooIdFrame"
        width="100%" height="100%" src="" >foo</iframe>' +
                    '</div>'
        };

        var googleTab =
        {  label: "Google!",
            id: "googleId",
            content: '<div style="height:500px">' +
                        '<iframe id="googleIdFrame" name="googleIdFrame"
        width="100%" height="100%" src="" >foo</iframe>' +
                    '</div>'
        };

        var gTabView;

        function init()
        {
            gTabView = new YAHOO.widget.TabView('tabsDiv');
            gTabView.addTab ( new YAHOO.widget.Tab ( yahooTab ) );
            gTabView.addTab ( new YAHOO.widget.Tab ( googleTab ) );

            gTabView.subscribe("activeTabChange", tabSelected );
        }

        function tabSelected( eventInfo )
        {
            var src = "about:blank";
            var newTabId = eventInfo.newValue.get("id");
            if ( newTabId == "yahooId" )
                src = "http://www.yahoo.com";
            else if ( newTabId == "googleId" )
                src = "http://www.google.com";
           
            document.getElementById(newTabId+"Frame").src = src;
        }

        YAHOO.util.Event.onDOMReady(init);

        </script>

        <body class=" yui-skin-sam">

        <div id="tabsDiv" class="yui-navset"/>

        </body>
        </html>



        ------------------------------------

        Yahoo! Groups Links

        <*> To visit your group on the web, go to:
            http://groups.yahoo.com/group/ydn-javascript/

        <*> Your email settings:
            Individual Email | Traditional

        <*> To change settings online go to:
            http://groups.yahoo.com/group/ydn-javascript/join
            (Yahoo! ID required)

        <*> To change settings via email:
            mailto:ydn-javascript-digest@yahoogroups.com
            mailto:ydn-javascript-fullfeatured@yahoogroups.com

        <*> To unsubscribe from this group, send an email to:
            ydn-javascript-unsubscribe@yahoogroups.com

        <*> Your use of Yahoo! Groups is subject to:
            http://docs.yahoo.com/info/terms/

      • aniad
        The src of the iframe depends on what is selected in other parts of the app, so the src gets dynamically created for a given uuid. Once the user chooses an
        Message 3 of 6 , Sep 5 1:50 PM
        • 0 Attachment
          The src of the iframe depends on what is selected in other parts of
          the app, so the src gets dynamically created for a given uuid. Once
          the user chooses an object in a table (flex widget) the code creates
          the url for the src.

          Since there can be quite a few tabs, I precreate them all with a blank
          src. Then depending on the object type and object id a certain subset
          of those tabs gets added to the tabview with each iframe having a
          specific src for that object's id/type. Otherwise I would be
          destroying and creating tabs all the time which I thought would not be
          as effective/expedient as removing/adding them.

          Is there anyway to prevent history entry when src is blank?

          a.

          --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
          >
          > The issue is that you are creating the iframe without a src, which
          logs a history entry, then you are changing that src, which logs a
          different history entry..
          >
          > Why don't you just put the src in when you generate the tab instead
          of changing it on every tab change?
          >
          > Dav
          >
          >
          >
          > Dav Glass
          > dav.glass@...
          > blog.davglass.com
          >
          >
          >
          >
          > + Windows: n. - The most successful computer virus, ever. +
          > + A computer without a Microsoft operating system is like a dog
          > without bricks tied to its head +
          > + A Microsoft Certified Systems Engineer is to computing what a
          > McDonalds Certified Food Specialist is to fine cuisine +
          >
          >
          >
          > ----- Original Message ----
          > From: aniad <aniad@...>
          > To: ydn-javascript@yahoogroups.com
          > Sent: Wednesday, September 3, 2008 4:53:43 PM
          > Subject: [ydn-javascript] iframes inside a tab view are reloaded on
          'back button in Firefox
          >
          > I have a tab control where each tab has an iframe. The content of the
          > iframe is dynamic depending on what else was selected on the page.
          > When a tab is selected it loads some url into the iframe.
          >
          > On Firefox hitting the back button reloads the iframe in some peculiar
          > way that it wipes out its content (I do nothing to monitor or act on
          > the browser's back button).
          >
          > Here is code which shows this problem. After showing the page, select
          > one of the tabs so that the iframe is loaded, then hit Firefox's back
          > button.
          >
          > Ania.
          >
          > <script>
          > var yahooTab =
          > { label: "Yahoo!",
          > id: "yahooId",
          > content: '<div style="height:500px">' +
          > '<iframe id="yahooIdFrame" name="yahooIdFrame"
          > width="100%" height="100%" src="" >foo</iframe>' +
          > '</div>'
          > };
          >
          > var googleTab =
          > { label: "Google!",
          > id: "googleId",
          > content: '<div style="height:500px">' +
          > '<iframe id="googleIdFrame" name="googleIdFrame"
          > width="100%" height="100%" src="" >foo</iframe>' +
          > '</div>'
          > };
          >
          > var gTabView;
          >
          > function init()
          > {
          > gTabView = new YAHOO.widget.TabView('tabsDiv');
          > gTabView.addTab ( new YAHOO.widget.Tab ( yahooTab ) );
          > gTabView.addTab ( new YAHOO.widget.Tab ( googleTab ) );
          >
          > gTabView.subscribe("activeTabChange", tabSelected );
          > }
          >
          > function tabSelected( eventInfo )
          > {
          > var src = "about:blank";
          > var newTabId = eventInfo.newValue.get("id");
          > if ( newTabId == "yahooId" )
          > src = "http://www.yahoo.com";
          > else if ( newTabId == "googleId" )
          > src = "http://www.google.com";
          >
          > document.getElementById(newTabId+"Frame").src = src;
          > }
          >
          > YAHOO.util.Event.onDOMReady(init);
          >
          > </script>
          >
          > <body class=" yui-skin-sam">
          >
          > <div id="tabsDiv" class="yui-navset"/>
          >
          > </body>
          > </html>
          >
          >
          >
          > ------------------------------------
          >
          > Yahoo! Groups Links
          >
          >
          >
          > http://docs.yahoo.com/info/terms/
          >
        • Dav Glass
          Why not create the iframe content when they first visit the tab? Since it s changing the src of the iframe it will always write an entry to the history.. Dav
          Message 4 of 6 , Sep 5 2:04 PM
          • 0 Attachment
            Why not create the iframe content when they first visit the tab?

            Since it's changing the src of the iframe it will always write an entry to the history..

            Dav
             
            Dav Glass
            dav.glass@...
            blog.davglass.com



            + Windows: n. - The most successful computer virus, ever. +
            + A computer without a Microsoft operating system is like a dog
            without bricks tied to its head +
            + A Microsoft Certified Systems Engineer is to computing what a
            McDonalds Certified Food Specialist is to fine cuisine +


            ----- Original Message ----
            From: aniad <aniad@...>
            To: ydn-javascript@yahoogroups.com
            Sent: Friday, September 5, 2008 1:50:32 PM
            Subject: [ydn-javascript] Re: iframes inside a tab view are reloaded on 'back button in Firefox

            The src of the iframe depends on what is selected in other parts of
            the app, so the src gets dynamically created for a given uuid.  Once
            the user chooses an object in a table (flex widget) the code creates
            the url for the src.

            Since there can be quite a few tabs, I precreate them all with a blank
            src.  Then depending on the object type and object id a certain subset
            of those tabs gets added to the tabview with each iframe having a
            specific src for that object's id/type.  Otherwise I would be
            destroying and creating tabs all the time which I thought would not be
            as effective/expedient as removing/adding them.

            Is there anyway to prevent history entry when src is blank?

            a.

            --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
            >
            > The issue is that you are creating the iframe without a src, which
            logs a history entry, then you are changing that src, which logs a
            different history entry..
            >
            > Why don't you just put the src in when you generate the tab instead
            of changing it on every tab change?
            >
            > Dav
            >
            >
            >
            >  Dav Glass
            > dav.glass@...
            > blog.davglass.com
            >
            >
            >
            >
            > + Windows: n. - The most successful computer virus, ever. +
            > + A computer without a Microsoft operating system is like a dog
            > without bricks tied to its head +
            > + A Microsoft Certified Systems Engineer is to computing what a
            > McDonalds Certified Food Specialist is to fine cuisine  +
            >
            >
            >
            > ----- Original Message ----
            > From: aniad <aniad@...>
            > To: ydn-javascript@yahoogroups.com
            > Sent: Wednesday, September 3, 2008 4:53:43 PM
            > Subject: [ydn-javascript] iframes inside a tab view are reloaded on
            'back button in Firefox
            >
            > I have a tab control where each tab has an iframe.  The content of the
            > iframe is dynamic depending on what else was selected on the page.
            > When a tab is selected it loads some url into the iframe.
            >
            > On Firefox hitting the back button reloads the iframe in some peculiar
            > way that it wipes out its content (I do nothing to monitor or act on
            > the browser's back button).
            >
            > Here is code which shows this problem.  After showing the page, select
            > one of the tabs so that the iframe is loaded, then hit Firefox's back
            > button.
            >
            > Ania.
            >
            > <script>
            > var yahooTab =
            > {  label: "Yahoo!",
            >    id: "yahooId",
            >    content: '<div style="height:500px">' +
            >                '<iframe id="yahooIdFrame" name="yahooIdFrame"
            > width="100%" height="100%" src="" >foo</iframe>' +
            >              '</div>'
            > };
            >
            > var googleTab =
            > {  label: "Google!",
            >    id: "googleId",
            >    content: '<div style="height:500px">' +
            >                '<iframe id="googleIdFrame" name="googleIdFrame"
            > width="100%" height="100%" src="" >foo</iframe>' +
            >              '</div>'
            > };
            >
            > var gTabView;
            >
            > function init()
            > {
            >    gTabView = new YAHOO.widget.TabView('tabsDiv');
            >    gTabView.addTab ( new YAHOO.widget.Tab ( yahooTab ) );
            >    gTabView.addTab ( new YAHOO.widget.Tab ( googleTab ) );
            >
            >    gTabView.subscribe("activeTabChange", tabSelected );
            > }
            >
            > function tabSelected( eventInfo )
            > {
            >    var src = "about:blank";
            >    var newTabId = eventInfo.newValue.get("id");
            >    if ( newTabId == "yahooId" )
            >        src = "http://www.yahoo.com";
            >    else if ( newTabId == "googleId" )
            >        src = "http://www.google.com";
            >   
            >    document.getElementById(newTabId+"Frame").src = src;
            > }
            >
            > YAHOO.util.Event.onDOMReady(init);
            >
            > </script>
            >
            > <body class=" yui-skin-sam">
            >
            > <div id="tabsDiv" class="yui-navset"/>
            >
            > </body>
            > </html>
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            >    http://docs.yahoo.com/info/terms/
            >



            ------------------------------------

            Yahoo! Groups Links

            <*> To visit your group on the web, go to:
                http://groups.yahoo.com/group/ydn-javascript/

            <*> Your email settings:
                Individual Email | Traditional

            <*> To change settings online go to:
                http://groups.yahoo.com/group/ydn-javascript/join
                (Yahoo! ID required)

            <*> To change settings via email:
                mailto:ydn-javascript-digest@yahoogroups.com
                mailto:ydn-javascript-fullfeatured@yahoogroups.com

            <*> To unsubscribe from this group, send an email to:
                ydn-javascript-unsubscribe@yahoogroups.com

            <*> Your use of Yahoo! Groups is subject to:
                http://docs.yahoo.com/info/terms/

          • aniad
            Hi Dav, But WHY is the iframe state being written to history??? Is there a way to prevent that? I actually don t want the state of the iframe to be written to
            Message 5 of 6 , Sep 9 1:36 PM
            • 0 Attachment
              Hi Dav,

              But WHY is the iframe state being written to history??? Is there a way
              to prevent that? I actually don't want the state of the iframe to be
              written to history.

              Please advise,
              Ania.


              --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
              >
              > Why not create the iframe content when they first visit the tab?
              >
              > Since it's changing the src of the iframe it will always write an
              entry to the history..
              >
              > Dav
              >
              > Dav Glass
              > dav.glass@...
              > blog.davglass.com
              >
              >
              >
              >
              > + Windows: n. - The most successful computer virus, ever. +
              > + A computer without a Microsoft operating system is like a dog
              > without bricks tied to its head +
              > + A Microsoft Certified Systems Engineer is to computing what a
              > McDonalds Certified Food Specialist is to fine cuisine +
              >
              >
              >
              > ----- Original Message ----
              > From: aniad <aniad@...>
              > To: ydn-javascript@yahoogroups.com
              > Sent: Friday, September 5, 2008 1:50:32 PM
              > Subject: [ydn-javascript] Re: iframes inside a tab view are reloaded
              on 'back button in Firefox
              >
              > The src of the iframe depends on what is selected in other parts of
              > the app, so the src gets dynamically created for a given uuid. Once
              > the user chooses an object in a table (flex widget) the code creates
              > the url for the src.
              >
              > Since there can be quite a few tabs, I precreate them all with a blank
              > src. Then depending on the object type and object id a certain subset
              > of those tabs gets added to the tabview with each iframe having a
              > specific src for that object's id/type. Otherwise I would be
              > destroying and creating tabs all the time which I thought would not be
              > as effective/expedient as removing/adding them.
              >
              > Is there anyway to prevent history entry when src is blank?
              >
              > a.
              >
              > --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@> wrote:
              > >
              > > The issue is that you are creating the iframe without a src, which
              > logs a history entry, then you are changing that src, which logs a
              > different history entry..
              > >
              > > Why don't you just put the src in when you generate the tab instead
              > of changing it on every tab change?
              > >
              > > Dav
              > >
              > >
              > >
              > > Dav Glass
              > > dav.glass@
              > > blog.davglass.com
              > >
              > >
              > >
              > >
              > > + Windows: n. - The most successful computer virus, ever. +
              > > + A computer without a Microsoft operating system is like a dog
              > > without bricks tied to its head +
              > > + A Microsoft Certified Systems Engineer is to computing what a
              > > McDonalds Certified Food Specialist is to fine cuisine +
              > >
              > >
              > >
              > > ----- Original Message ----
              > > From: aniad <aniad@>
              > > To: ydn-javascript@yahoogroups.com
              > > Sent: Wednesday, September 3, 2008 4:53:43 PM
              > > Subject: [ydn-javascript] iframes inside a tab view are reloaded on
              > 'back button in Firefox
              > >
              > > I have a tab control where each tab has an iframe. The content of the
              > > iframe is dynamic depending on what else was selected on the page.
              > > When a tab is selected it loads some url into the iframe.
              > >
              > > On Firefox hitting the back button reloads the iframe in some peculiar
              > > way that it wipes out its content (I do nothing to monitor or act on
              > > the browser's back button).
              > >
              > > Here is code which shows this problem. After showing the page, select
              > > one of the tabs so that the iframe is loaded, then hit Firefox's back
              > > button.
              > >
              > > Ania.
              > >
              > > <script>
              > > var yahooTab =
              > > { label: "Yahoo!",
              > > id: "yahooId",
              > > content: '<div style="height:500px">' +
              > > '<iframe id="yahooIdFrame" name="yahooIdFrame"
              > > width="100%" height="100%" src="" >foo</iframe>' +
              > > '</div>'
              > > };
              > >
              > > var googleTab =
              > > { label: "Google!",
              > > id: "googleId",
              > > content: '<div style="height:500px">' +
              > > '<iframe id="googleIdFrame" name="googleIdFrame"
              > > width="100%" height="100%" src="" >foo</iframe>' +
              > > '</div>'
              > > };
              > >
              > > var gTabView;
              > >
              > > function init()
              > > {
              > > gTabView = new YAHOO.widget.TabView('tabsDiv');
              > > gTabView.addTab ( new YAHOO.widget.Tab ( yahooTab ) );
              > > gTabView.addTab ( new YAHOO.widget.Tab ( googleTab ) );
              > >
              > > gTabView.subscribe("activeTabChange", tabSelected );
              > > }
              > >
              > > function tabSelected( eventInfo )
              > > {
              > > var src = "about:blank";
              > > var newTabId = eventInfo.newValue.get("id");
              > > if ( newTabId == "yahooId" )
              > > src = "http://www.yahoo.com";
              > > else if ( newTabId == "googleId" )
              > > src = "http://www.google.com";
              > >
              > > document.getElementById(newTabId+"Frame").src = src;
              > > }
              > >
              > > YAHOO.util.Event.onDOMReady(init);
              > >
              > > </script>
              > >
              > > <body class=" yui-skin-sam">
              > >
              > > <div id="tabsDiv" class="yui-navset"/>
              > >
              > > </body>
              > > </html>
              > >
              > >
              > >
              > > ------------------------------------
              > >
              > > Yahoo! Groups Links
              > >
              > >
              > >
              > > http://docs.yahoo.com/info/terms/
              > >
              >
              >
              >
              > ------------------------------------
              >
              > Yahoo! Groups Links
              >
              >
              >
              > http://docs.yahoo.com/info/terms/
              >
            • Dav Glass
              aniad -- Each time the src of an iframe is changed a history entry is written.. Since you are creating the iframe with no src, the browser will usually default
              Message 6 of 6 , Sep 9 2:03 PM
              • 0 Attachment
                aniad --

                Each time the src of an iframe is changed a history entry is written..

                Since you are creating the iframe with no src, the browser will usually default to about:blank, then write a history entry.

                AFAIK, there is no way to stop history from being written when you change a page.

                Dav
                 
                Dav Glass
                dav.glass@...
                blog.davglass.com



                + Windows: n. - The most successful computer virus, ever. +
                + A computer without a Microsoft operating system is like a dog
                without bricks tied to its head +
                + A Microsoft Certified Systems Engineer is to computing what a
                McDonalds Certified Food Specialist is to fine cuisine +


                ----- Original Message ----
                From: aniad <aniad@...>
                To: ydn-javascript@yahoogroups.com
                Sent: Tuesday, September 9, 2008 1:36:48 PM
                Subject: [ydn-javascript] Re: iframes inside a tab view are reloaded on 'back button in Firefox

                Hi Dav,

                But WHY is the iframe state being written to history??? Is there a way
                to prevent that?  I actually don't want the state of the iframe to be
                written to history.

                Please advise,
                Ania.


                --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@...> wrote:
                >
                > Why not create the iframe content when they first visit the tab?
                >
                > Since it's changing the src of the iframe it will always write an
                entry to the history..
                >
                > Dav
                >
                >  Dav Glass
                > dav.glass@...
                > blog.davglass.com
                >
                >
                >
                >
                > + Windows: n. - The most successful computer virus, ever. +
                > + A computer without a Microsoft operating system is like a dog
                > without bricks tied to its head +
                > + A Microsoft Certified Systems Engineer is to computing what a
                > McDonalds Certified Food Specialist is to fine cuisine  +
                >
                >
                >
                > ----- Original Message ----
                > From: aniad <aniad@...>
                > To: ydn-javascript@yahoogroups.com
                > Sent: Friday, September 5, 2008 1:50:32 PM
                > Subject: [ydn-javascript] Re: iframes inside a tab view are reloaded
                on 'back button in Firefox
                >
                > The src of the iframe depends on what is selected in other parts of
                > the app, so the src gets dynamically created for a given uuid.  Once
                > the user chooses an object in a table (flex widget) the code creates
                > the url for the src.
                >
                > Since there can be quite a few tabs, I precreate them all with a blank
                > src.  Then depending on the object type and object id a certain subset
                > of those tabs gets added to the tabview with each iframe having a
                > specific src for that object's id/type.  Otherwise I would be
                > destroying and creating tabs all the time which I thought would not be
                > as effective/expedient as removing/adding them.
                >
                > Is there anyway to prevent history entry when src is blank?
                >
                > a.
                >
                > --- In ydn-javascript@yahoogroups.com, Dav Glass <dav.glass@> wrote:
                > >
                > > The issue is that you are creating the iframe without a src, which
                > logs a history entry, then you are changing that src, which logs a
                > different history entry..
                > >
                > > Why don't you just put the src in when you generate the tab instead
                > of changing it on every tab change?
                > >
                > > Dav
                > >
                > >
                > >
                > >  Dav Glass
                > > dav.glass@
                > > blog.davglass.com
                > >
                > >
                > >
                > >
                > > + Windows: n. - The most successful computer virus, ever. +
                > > + A computer without a Microsoft operating system is like a dog
                > > without bricks tied to its head +
                > > + A Microsoft Certified Systems Engineer is to computing what a
                > > McDonalds Certified Food Specialist is to fine cuisine  +
                > >
                > >
                > >
                > > ----- Original Message ----
                > > From: aniad <aniad@>
                > > To: ydn-javascript@yahoogroups.com
                > > Sent: Wednesday, September 3, 2008 4:53:43 PM
                > > Subject: [ydn-javascript] iframes inside a tab view are reloaded on
                > 'back button in Firefox
                > >
                > > I have a tab control where each tab has an iframe.  The content of the
                > > iframe is dynamic depending on what else was selected on the page.
                > > When a tab is selected it loads some url into the iframe.
                > >
                > > On Firefox hitting the back button reloads the iframe in some peculiar
                > > way that it wipes out its content (I do nothing to monitor or act on
                > > the browser's back button).
                > >
                > > Here is code which shows this problem.  After showing the page, select
                > > one of the tabs so that the iframe is loaded, then hit Firefox's back
                > > button.
                > >
                > > Ania.
                > >
                > > <script>
                > > var yahooTab =
                > > {  label: "Yahoo!",
                > >    id: "yahooId",
                > >    content: '<div style="height:500px">' +
                > >                '<iframe id="yahooIdFrame" name="yahooIdFrame"
                > > width="100%" height="100%" src="" >foo</iframe>' +
                > >              '</div>'
                > > };
                > >
                > > var googleTab =
                > > {  label: "Google!",
                > >    id: "googleId",
                > >    content: '<div style="height:500px">' +
                > >                '<iframe id="googleIdFrame" name="googleIdFrame"
                > > width="100%" height="100%" src="" >foo</iframe>' +
                > >              '</div>'
                > > };
                > >
                > > var gTabView;
                > >
                > > function init()
                > > {
                > >    gTabView = new YAHOO.widget.TabView('tabsDiv');
                > >    gTabView.addTab ( new YAHOO.widget.Tab ( yahooTab ) );
                > >    gTabView.addTab ( new YAHOO.widget.Tab ( googleTab ) );
                > >
                > >    gTabView.subscribe("activeTabChange", tabSelected );
                > > }
                > >
                > > function tabSelected( eventInfo )
                > > {
                > >    var src = "about:blank";
                > >    var newTabId = eventInfo.newValue.get("id");
                > >    if ( newTabId == "yahooId" )
                > >        src = "http://www.yahoo.com";
                > >    else if ( newTabId == "googleId" )
                > >        src = "http://www.google.com";
                > >   
                > >    document.getElementById(newTabId+"Frame").src = src;
                > > }
                > >
                > > YAHOO.util.Event.onDOMReady(init);
                > >
                > > </script>
                > >
                > > <body class=" yui-skin-sam">
                > >
                > > <div id="tabsDiv" class="yui-navset"/>
                > >
                > > </body>
                > > </html>
                > >
                > >
                > >
                > > ------------------------------------
                > >
                > > Yahoo! Groups Links
                > >
                > >
                > >
                > >    http://docs.yahoo.com/info/terms/
                > >
                >
                >
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                >
                >    http://docs.yahoo.com/info/terms/
                >



                ------------------------------------

                Yahoo! Groups Links

                <*> To visit your group on the web, go to:
                    http://groups.yahoo.com/group/ydn-javascript/

                <*> Your email settings:
                    Individual Email | Traditional

                <*> To change settings online go to:
                    http://groups.yahoo.com/group/ydn-javascript/join
                    (Yahoo! ID required)

                <*> To change settings via email:
                    mailto:ydn-javascript-digest@yahoogroups.com
                    mailto:ydn-javascript-fullfeatured@yahoogroups.com

                <*> To unsubscribe from this group, send an email to:
                    ydn-javascript-unsubscribe@yahoogroups.com

                <*> Your use of Yahoo! Groups is subject to:
                    http://docs.yahoo.com/info/terms/

              Your message has been successfully submitted and would be delivered to recipients shortly.