在Flex错误中打开URL(Open URL in Flex error)

系统教程 行业动态 更新时间:2024-06-14 16:57:17
在Flex错误中打开URL(Open URL in Flex error)

我试图让一个按钮操作打开一个浏览器窗口到一个特定的URL ,我想我几乎得到了它,但有一个奇怪的问题正在发生。 下面的代码打开一个新的浏览器窗口,但是将URL添加到父窗口的URL末尾。 见下文:

protected function launchPrinter_clickHandler(event:MouseEvent):void { var url:String = dataGrid2.selectedItem.ip_address; var urlRequest:URLRequest = new URLRequest(url); navigateToURL(urlRequest); }

这是父URL: http://???.???.???.???/IT%20Tools-debug/Main.html

这是新创建的浏览器窗口中的URL: http://???.???.???.???/IT%20Tools-debug/15.155.205.134

如何使用url变量作为地址打开新的浏览器窗口?

I am trying to make a button action open a browser window to a particular URL and I think I've almost got it but there is a weird problem going on. The code below opens a new browser window but adds the URL to the end of the URL from the parent window. See below:

protected function launchPrinter_clickHandler(event:MouseEvent):void { var url:String = dataGrid2.selectedItem.ip_address; var urlRequest:URLRequest = new URLRequest(url); navigateToURL(urlRequest); }

Here is the parent URL: http://???.???.???.???/IT%20Tools-debug/Main.html

Here is the URL from the newly created browser window: http://???.???.???.???/IT%20Tools-debug/15.155.205.134

How do I open a new browser window with just the url variable being the address?

最满意答案

尝试这个:

var url:String = "http://"+dataGrid2.selectedItem.ip_address;

Try this:

var url:String = "http://"+dataGrid2.selectedItem.ip_address;

更多推荐

本文发布于:2023-04-12 20:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/066fa0ab71d736012f9d18c64a52c8bb.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   Flex   URL   error   Open

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!