yanyaocrystal 2016-04-19 09:14 采纳率: 0%
浏览 1404
已结题

在本地调试成功的超链接,放到服务器上不行

用myeclipse开发的地图应用,左侧有个信息列表。
图片说明
加了超链接功能,在本地没有问题,部署到服务器上就根本没有超链接显示。
图片说明
代码如下。我开始以为是超链接的链接问题,但是在别的电脑上试了,输入我的电脑的IP地址是能够访问的。但是服务器上就是不行。急急急。
<?xml version="1.0" encoding="utf-8"?>
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:services="services.*"
width="200" height="436"
backgroundColor="#0AD6F4" borderStyle="solid"
fontSize="14" creationComplete="init()">
fx:Declarations
<!-- 将非可视元素(例如服务、值对象)放在此处 -->


/fx:Declarations

<fx:Script>
    <![CDATA[
        import mx.controls.Alert;
        import mx.rpc.events.ResultEvent;

        import valueObjects.WTDMsg;

        [Bindable]
        private var wtdMsg:WTDMsg = new WTDMsg();
        private var trainNum:String = null;

        private function init():void {
            getWtdMsg();
        }
        /**
         * Flex 远程服务调用获取当前信息
         * */
        private function getWtdMsg():void {
            getWTDMsgResult.token = msgService.getWTDMsg();
            getWTDMsgResult.addEventListener(ResultEvent.RESULT, display);
        }
        /**
         * 获取到信息后的事件处理,因为数据已进行绑定不再重新赋值
         * */
        private function display(event:ResultEvent):void{
            this.wtdMsg = event.result as WTDMsg;
        }

        protected function textLabel_clickHandler(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailTotalInfo.html?trainNum=";
            url += this.trainNum;
            navigateToURL(new URLRequest(url), "_blank");    
        }
        protected function textLabel_clickHandler_use(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailTotalInfo2.html?flag=use";
            navigateToURL(new URLRequest(url), "_blank");    
        }
        protected function textLabel_clickHandler_unuse(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailTotalInfo2.html?flag=unuse";
            navigateToURL(new URLRequest(url), "_blank");    
        }
        protected function textLabel_clickHandler_failure1(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailFailure1.html";
            navigateToURL(new URLRequest(url), "_blank");    
        }
        protected function textLabel_clickHandler_failure2(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailFailure2.html";
            navigateToURL(new URLRequest(url), "_blank");    
        }
        protected function textLabel_clickHandler_driver(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailDriver.html";
            navigateToURL(new URLRequest(url), "_blank");    
        }
        protected function textLabel_clickHandler_log(event:MouseEvent):void
        {
            var url:String = "/mapgis/flex/DetailFailureLog.html";
            navigateToURL(new URLRequest(url), "_blank");    
        }
    ]]>
</fx:Script>

<!-- 基本信息 -->
<mx:Label fontStyle="italic" fontWeight="bold" text="基本信息"/>
<mx:HRule width="100%"/>
<mx:Canvas width="100%">
    <mx:VBox>
        <mx:HBox>
            <mx:Label text="动车数量:"/><mx:Label id="trainAmount" click="textLabel_clickHandler(event)" color="blue" textDecoration="underline" text="{wtdMsg.trainAmount}"/>
        </mx:HBox>
        <mx:HBox>
            <mx:Label text="CRH2:"/><mx:Label id="crh" click="textLabel_clickHandler(event)" color="blue" textDecoration="underline" text="{wtdMsg.crhAmount}"/>
        </mx:HBox>
    </mx:VBox>
</mx:Canvas>
<!-- 运用信息 -->
<mx:Label fontStyle="italic" fontWeight="bold" text="运用信息"/>
<mx:HRule width="100%"/>
<mx:Canvas width="100%">
    <mx:VBox>
        <mx:HBox>
            <mx:Label text="运用中:"/><mx:Label id="using" click="textLabel_clickHandler_use(event)" color="blue" textDecoration="underline" text="{wtdMsg.inuse}"/>
        </mx:HBox>
        <mx:HBox>
            <mx:Label text="未运用:"/><mx:Label id="nouse" click="textLabel_clickHandler_unuse(event)" color="blue" textDecoration="underline" text="{wtdMsg.nouse}"/>
        </mx:HBox>
    </mx:VBox>
</mx:Canvas>
<!-- 故障信息 -->
<mx:Label fontStyle="italic" fontWeight="bold" text="故障信息"/>
<mx:HRule width="100%"/>
<mx:Canvas width="100%">
    <mx:VBox>
        <mx:HBox>
            <mx:Label text="故障数据:"/><mx:Label id="failData" click="textLabel_clickHandler_failure1(event)" color="blue" textDecoration="underline" text="{wtdMsg.dataFailure}"/>
        </mx:HBox>
        <mx:HBox>
            <mx:Label text="主故障记录:"/><mx:Label id="mainFail" click="textLabel_clickHandler_failure2(event)" color="blue" textDecoration="underline" text="{wtdMsg.mainFailure}"/>
        </mx:HBox>
        <mx:HBox>
            <mx:Label text="画面故障:"/><mx:Label id="screenFail" click="textLabel_clickHandler_driver(event)" color="blue" textDecoration="underline" text="{wtdMsg.screenFailure}"/>
        </mx:HBox>
        <mx:HBox>
            <mx:Label text="已处理故障:"/><mx:Label id="deployFail" click="textLabel_clickHandler_log(event)" color="blue" textDecoration="underline" text="{wtdMsg.deployedFailure}"/>
        </mx:HBox>
    </mx:VBox>
</mx:Canvas>
<!-- 设备信息 -->
<mx:Label fontStyle="italic" fontWeight="bold" text="设备信息"/>
<mx:HRule width="100%"/>
<mx:Canvas width="100%">
    <mx:VBox>
        <mx:HBox>
            <mx:Label text="WTD设备安装:"/><mx:Label id="wtdOn" click="textLabel_clickHandler_use(event)" color="blue" textDecoration="underline" text="{wtdMsg.onWTD}"/>
        </mx:HBox>
        <mx:HBox>
            <mx:Label text="离线设备:"/><mx:Label id="wtdOff" click="textLabel_clickHandler_unuse(event)" color="blue" textDecoration="underline" text="{wtdMsg.offWTD}"/>
        </mx:HBox>
    </mx:VBox>
</mx:Canvas>

/mx:VBox

  • 写回答

2条回答

  • threenewbee 2016-04-19 11:08
    关注

    用fiddler或者IE F12看下,是不是跨域或者链接相对路径的问题。

    评论

报告相同问题?

悬赏问题

  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型