Another problem I've run into is when the user has the Information
Bar itself turned off from the Popup Blocker Settings dialog. The
user clicks a link and, from their perspective, nothing happens. I
use a utility class to handle both this case and the one you
mentioned, and it has worked pretty well.
Usage: utils.BrowserUtil.openBrowserWindow(url, name, props);
The three parameters are the same as for the Javascript window.open
() function. All three are Strings, with the first being required
and the other two optional. Note that this utility doesn't support
all URLs; for example, you couldn't pass a javascript: prefixed url
to it.
Here's the code for utils/BrowserUtil.as
-----------------------------------
class utils.BrowserUtil {
import mx.core.Application;
public static function openBrowserWindow(url: String, name:
String, params: String) : Void {
var errorMsg: String = "Warning - Popup Blocked" +
"\\n\\nYour browser\\'s popup blocker may be enabled." +
"\\nPlease change your popup blocker settings in order
to view the requested page.";
if (name == null) name = "_blank";
mx.core.Application.getURL("javascript:var newwnd =
window.open('" + url + "', '" +
name + (params == null? "" : ("', '" + params)) + "');"
+
"if (newwnd == null) {" +
" alert('" + errorMsg + "')" +
"}" +
"else {" +
" newwnd.focus();" +
"}"
);
}
}
Hope that is of some help.
Doug
--- In [email protected], "Hassan Schroeder"
<[EMAIL PROTECTED]> wrote:
>
> I'm seeing a problem on a Flex site involving Win/IE that started
with
> the latest MS security update.
>
> When the user clicks a link to download anything -- PDF, tar file,
etc. --
> IE's "download blocked" notification bar appears. When the user OKs
> the download, IE immediately requests the original site URL ("/")
and
> the user's page view is reset. Then they have to navigate back to
the
> view with the download, at which point clicking the link works as
> expected.
>
> Does anyone have any ideas on what's causing this, or how to deal
> with it?
>
> I'm new to Flex so I'm not even sure what other information might
be
> relevant, so feel free to ask :-)
>
> TIA!
> --
> Hassan Schroeder ------------------------ [EMAIL PROTECTED]
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/