[dev] HEAD: problems with "view external web page" applet

Joe Wilson joe.wilson at mindcandy.org
Fri Aug 1 20:11:51 PDT 2003


Sorry - actually, I patched the original and then diff'ed it against HEAD.
Oops.

Here is the correct version.

Joe

*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
 *#
  *#   Joe Wilson             (917) 690-0507 (c)
   *#   884 Palmer Ave.        (914) 777-3250 (h)
    *#   Mamaroneck, NY 10543
     *#
      *#    He to whom [the mysterious] is a stranger,
       *#    who can no longer pause to wonder and stand
        *#    rapt in awe, is as good as dead: his eyes are closed.
         *#                           - Albert Einstein
          *#
           *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Joe Wilson <joe.wilson at mindcandy.org>:
>
> > I do not have Mozilla installed so I cannot test that this works with that
> > browser, but it should solve the problem for both MSIE and Mozilla.  It
> will
> > also allow for the extension of this to any other browsers that have
> > differing behavior wrt iframes.
>
> This looks like it does the right thing, but the patch is against the
> original
> iframe.php, not the version that is in CVS. Please re-send it against the
> latest version?
>
> -chuck
>
> --
> Charles Hagenbuch, <chuck at horde.org>
> They're just looking at a wall of meat.
>
> --
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
-------------- next part --------------
Index: iframe.php
===================================================================
RCS file: /usr/local/cvs/horde/horde/lib/Block/iframe.php,v
retrieving revision 1.1
diff -u -r1.1 iframe.php
--- iframe.php	31 Jul 2003 03:29:49 -0000	1.1
+++ iframe.php	2 Aug 2003 03:08:17 -0000
@@ -44,7 +44,22 @@
      */
     function _content()
     {
-        return '<iframe src="' . $this->_params['iframe'] . '" width="100%" height="100%" marginheight="0" scrolling="yes" frameborder="0"></iframe>';
-    }
+        require_once HORDE_BASE . '/lib/Browser.php';
+        $browser = &Browser::singleton();
+
+        if (!$browser->hasFeature('iframe'))
+        {
+            $html = "Your browser does not support iFrames.";
+        }
+        if ($browser->getBrowser() == "msie")
+        {
+            $html = '<iframe src="' . $this->_params['iframe'] . '" width="100%" marginheight="0" scrolling="yes" frameborder="0"></iframe>';
+        }
+        else
+        {
+            $html = '<iframe src="' . $this->_params['iframe'] . '" width="100%" height="100%" marginheight="0" scrolling="yes" frameborder="0"></iframe>';
+        }
+        return $html;
+}
 
 }


More information about the dev mailing list