Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8193044

JavaFX WebView shows blank page for particular HTML

XMLWordPrintable

    • web
    • generic
    • generic

      FULL PRODUCT VERSION :
      java version "1.8.0_152"
      Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
      Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows 8.1 Enterprise

      A DESCRIPTION OF THE PROBLEM :
      We are using WebView to show the content of HTML requests/responses stored in memory. With a particular HTML it shows a blank page although this HTML is correctly opened in browsers. Also it is correctly opened in WebView if I use WebEngine::load() providing a URL to the same HTML file. But we have HTML in memory so we have to use loadContent() method which doesn't work for us.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I used WebView sample project from https://docs.oracle.com/javafx/2/webview/jfxpub-webview.htm. I replaced the line

      webEngine.load("http://www.oracle.com/products/index.html");

      with the following (method read() just reads the file to a string):

              String content = null;
              try {
                  content = read(WebViewSample.class.getResourceAsStream("login.html"));
              } catch (IOException e) {
                  e.printStackTrace();
              }
              webEngine.loadContent(content);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      On running the application WebView shows the HTML page. It works fine with the same file if I use load() method like this:

      webEngine.load(WebViewSample.class.getResource("login.html").toExternalForm());
      ACTUAL -
      I can see how the HTML is shown for a moment and then a blank page is shown.

      I also tried this with JRE 9.0.1.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      I managed to get some errors like this:

      Console: [undefined:269] ReferenceError: Can't find variable: $

      bun the same errors I get with load(url) and eventually HTML is shown. The mentioned lines contain jQuery expression $(document).ready(function() {}).

      The only difference between working and nonworking variants I saw when I added the line

      webEngine.locationProperty().addListener(
                      (observable, oldValue, newValue) -> System.out.println(newValue));

      When it doesn't work I see in the log location value "about:blank#",

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      WebViewSample.java:

              // additional logging
              com.sun.javafx.webkit.WebConsoleListener.setDefaultListener(
                      (webview, message, lineNumber, sourceId) -> System.out
                              .println("Console: [" + sourceId + ":" + lineNumber + "] " + message));
              webEngine.setOnError(event -> System.out.println(event.getMessage()));
              webEngine.locationProperty().addListener(
                      (observable, oldValue, newValue) -> System.out.println(newValue));

              // load the home page - line from original sample
              //webEngine.load("http://www.oracle.com/products/index.html");
              
              // this works
              //webEngine.load(WebViewSample.class.getResource("login.html").toExternalForm());
              
              // this shows blank page
              String content = null;
              try {
                  content = read(WebViewSample.class.getResourceAsStream("login.html"));
              } catch (IOException e) {
                  e.printStackTrace();
              }
              webEngine.loadContent(content);

      login.html:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <html lang="en"><body><div id="login_portal_book_2" class="wlp-bighorn-book"><div class="wlp-bighorn-book-content"><div id="login_portal_page_9" class="wlp-bighorn-page"><div class="wlp-bighorn-layout wlp-bighorn-layout-flow"><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-flow-vertical wlp-bighorn-layout-flow-first" style="width: 100%"><div></div><div id="portletInstance_11" class="wlp-bighorn-window "><div class="wlp-bighorn-titlebar"></div><div class="wlp-bighorn-window-content">


      <!DOCTYPE html>
      <html class="no-js">
      <!--<![endif]-->



      <!doctype HTML>
      <html>
      <head>

      <script type="text/javascript">
      window.history.forward();
      var is_firefocurl = navigator.userAgent.toLowerCase().indexOf('fox') > -1;
      {
      if(is_firefocurl)
      {
      var storedHash = window.location.hash;

      window.setInterval(function () {
      if (window.location.hash != storedHash) {
      window.location.hash = storedHash;

      }
      }, 50);
      }
      }
      var is_Safari = navigator.userAgent.toLowerCase().indexOf('safari')> -1;
      {
      if(is_Safari)
      {
      var storedHash = window.location.hash;

      window.setInterval(function () {
      if (window.location.hash != storedHash) {
      window.location.hash = storedHash;

      }
      }, 50);
      }
      }
         function noBack(){
            var is_fire = navigator.userAgent.toLowerCase().indexOf('fox') > -1;
               var is_IE = navigator.userAgent.toLowerCase().indexOf('msie') > -1;
                          
               if(is_IE==true){
                  window.history.forward();
                  setTimeout("noBack()", 0);
               }else{
               changeHashOnLoad();
               }
            }
               
              function changeHashOnLoad() {
              
               var browserurl = window.location.href.indexOf('#') > -1;
              
                  if(!browserurl)
                  {
                     window.location.href += "#";
                  }
                  setTimeout("changeHashAgain()", "50");
             }
              
             function changeHashAgain() {
           if (window.location.href.indexOf('#') > -1 ) {
                window.location.href += "1";
           }
             }
             
             var msgCloseButtonGlobal = 'Close';

      </script>
      <style id="antiClickjack">body{display:none !important;}</style>
      <script type="text/javascript">
          if (self === top) {
              var antiClickjack = document.getElementById("antiClickjack");
              antiClickjack.parentNode.removeChild(antiClickjack);
          } else {
              top.location = self.location;
          }
      </script>
      </head>
       
      <body onload="noBack();">
      <script type="text/javascript">
      var globalStaticPath = '/apspahbx';
      var msgDelete = 'Delete';
      var msgOk = 'Ok';
      var msgCancel = 'Cancel';
      var msgSaveNExit = 'Save and Exit';
      var msgRemove = 'Remove Member';
      var paynow = 'Individual:Payment Box';
      var msgVerify = 'Verify';
      var selectOne = 'Select One';


      </script>
      </body>
      </html>

      <head>
      <script type="text/javascript" src="/apspahbx/skins/acquity/js/jquery-1.9.1.min.js"></script>
      <script type="text/javascript" src="/apspahbx/skins/acquity/js/common.js"></script>
      <script type="text/javascript" src="/apspahbx/skins/acquity/js/main.js"></script>
      <script type="text/javascript" src="/apspahbx/skins/acquity/js/sprint3_help.js"></script>
      <script type="text/javascript" src="/apspahbx/skins/acquity/js/modernizr-custom.js"></script>
      <script type="text/javascript" src="/apspahbx/scripts/datepicker.js"></script>
      <script type="text/javascript" src="/apspahbx/scripts/datepicker-es.js"></script>
      <script type="text/javascript" src="/apspahbx/scripts/ruei_library.js"></script>
      <script type="text/javascript" src="/apspahbx/scripts/ruei_library_v2.js"></script>
      <script type="text/javascript" src="/apspahbx/scripts/header.js"></script>



      <link rel="stylesheet" href="/apspahbx/skins/acquity/css/main.css" type="text/css" property='stylesheet' />
      <link rel="stylesheet" href="/apspahbx/skins/acquity/css/global.css" type="text/css" property='stylesheet' />
      <link rel="stylesheet" href="/apspahbx/skins/acquity/css/grid.css" type="text/css" property='stylesheet' />
      <link rel="stylesheet" href="/apspahbx/skins/acquity/css/svg-style.css" type="text/css" property='stylesheet' />
      <link rel="shortcut icon" href="/apspahbx/skins/acquity/images/favicon.ico" type="image/x-icon" property='stylesheet' />
      <link rel="icon" href="/apspahbx/skins/acquity/images/favicon.ico" type="image/x-icon" property='stylesheet' />
      <script type="text/javascript">
      var m = document.createElement("meta");
      m.setAttribute("http-equiv", "X-UA-Compatible");
      m.setAttribute("content", "IE=edge,chrome=1");
      document.getElementsByTagName("head")[0].appendChild(m);

      var mlanguage = document.createElement("meta");

      mlanguage.setAttribute("http-equiv","Content-Type");
      mlanguage.setAttribute("content","Content-Type");
      mlanguage.setAttribute("charset","UTF-8");
      document.getElementsByTagName("head")[0].appendChild(mlanguage);
      </script>
      <meta itemprop="HandheldFriendly" content="True" />
      <meta itemprop="MobileOptimized" content="320" />
      <meta itemprop="format-detection" content="telephone=yes" />
      <meta itemprop="viewport" content="width=device-width, initial-scale=1" />
      <meta itemprop="apple-mobile-web-app-capable" content="yes" />
      <script>

        $(window).load(function(){oraInfo_v2.sendData();});

        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js&#39;,&#39;ga&#39;);
        
      ga('create', 'BD-39573391-5',{'allowLinker':true, 'cookiedomain': 'none'});
        

       $(document).ready(function(){
            oraInfo.sendData();
            ga('set','dimension2',$('#r_ur').text());
      ga('set','dimension3',$('#r_pl').text()); ga('send', 'pageview'); });

      <!-- End of Google Analytics -->
      </script>

      <!doctype HTML>


      <!-- plan selection maintain header -->

      <input type="hidden" id="logourl" value="https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=portletInstance_11&amp;_urlType=action&amp;wlpportletInstance_11_javax.portlet.action=renderUmbrella" />




      <script>
      var locateAssistancePopUp = {
      title : "Locate Assistance",
      closeButtonText : "Close"
      };
      </script>

      <input type="hidden" id="contactinfo" value="https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=portletInstance_11&amp;_urlType=action&amp;wlpportletInstance_11_javax.portlet.action=contactInfo" />


       
      <input type="hidden" id="langvalue2" value="en_US" />


      <input type="hidden" id="appLyPath" value="/apspahbx/ahbxanonym.portal?_nfpb=true&amp;_st=&amp;_pageLabel=signUpPage&amp;_windowLabel=SignUp_1&amp;_urlType=action&amp;wlpSignUp_1_javax.portlet.action=createNewAccount" />
      <input type="hidden" id="preview" value="https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=portletInstance_11&amp;_urlType=action&amp;wlpportletInstance_11_javax.portlet.action=prevplansUm" />

      <input type="hidden" id="learnUm" value="https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=portletInstance_11&amp;_urlType=action&amp;wlpportletInstance_11_javax.portlet.action=announceUm" />




      <script type="text/javascript">

      $(document).ready(function(){

      /*loading static content for header start here */
      var langtruevaluevalue = $('#langvalue2').val();
      if (langtruevaluevalue == 'en_US' || langtruevaluevalue == '' || langtruevaluevalue == ' ' ||langtruevaluevalue == 'en' ){
      $("#staticHeaderContent").load('https://df/static/apspahbx/staticheaderfootercontent/header_anon_en.html&#39;, function(responseTxt, statusTxt, xhr){
               if(statusTxt == "success")
               var applypathvalue = $('#appLyPath').val();
        $('#apply,#applyList a').attr("href", applypathvalue);
        var perviewvalue = $('#preview').val();
        $('#prevewPlan ,#prevewPlanList a').attr("href", perviewvalue);
        var explorevalue = $('#learnUm').val();
        $('#explore').attr("href", explorevalue);
        var logourlvalue = $('#logourl').val();
        $('#logoheaderurl').attr("href", logourlvalue);
       
        var contactvalue = $('#contactinfo').val();
        $('#contactca').attr("href", contactvalue);
       
        $(".langlink_es_ES").click( function() {
      var url = "/apspahbx/localeChange";
      $.ajax({
      type: 'GET',
      url: url,
      cache: false,
      data: {lang:"es"}, //parameters go here in object literal form
      success: function(data) {
      var window_url = window.location.href;
      var index=window_url.indexOf("lang=");
      if(index != -1){
      window.location = updateUrlParameter(window_url,'lang', 'es_ES' );
      }else{
      location.reload();
      }
      },
      error: function() {}
      });
      });
       
        $(".show_hide").show();
      $("#chatpopup").click( function() {
      ga('send', 'event', 'header navigation clicks', 'click', 'online chat', 1);
      fetchChatURLLive();
      });
      $("#explore").focusin(function() {
      $(".cc-language-dropdown").hide();
      $(".languages").hide();
      $("#exploreList").removeClass("hide");
      $("#prevewPlanList").removeClass("show");
      $("#applyList").removeClass("show");
      $("#getHelpList").removeClass("show");
      $("#exploreList").addClass("show");
      $("#prevewPlanList").addClass("hide");
      $("#applyList").addClass("hide");
      $("#getHelpList").addClass("hide");
      });

      $(".cc-change-language").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#exploreList").removeClass("hide");
      $(".cc-language-dropdown").show();
      $(".languages").show();

      });

      $("#localeDiv").focusin(function() {
      $(".cc-language-dropdown").hide();
      $(".languages").hide();

      });
      $(".cc-change-language").mouseover(function(){
      $(".cc-language-dropdown").show();
      $(".languages").show();

      });
      $(".cc-change-language").mouseout(function(){
      $(".cc-language-dropdown").hide();
      $(".languages").hide();

      });

      $("#prevewPlan").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#prevewPlanList").removeClass("hide");
      $("#applyList").removeClass("show");
      $("#getHelpList").removeClass("show");
      $("#exploreList").addClass("hide");
      $("#prevewPlanList").addClass("show");
      $("#applyList").addClass("hide");
      $("#getHelpList").addClass("hide");
      });

      $("#apply").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#prevewPlanList").removeClass("show");
      $("#applyList").removeClass("hide");
      $("#getHelpList").removeClass("show");
      $("#exploreList").addClass("hide");
      $("#prevewPlanList").addClass("hide");
      $("#applyList").addClass("show");
      $("#getHelpList").addClass("hide");
      });
      $("#getHelp").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#prevewPlanList").removeClass("show");
      $("#applyList").removeClass("show");
      $("#getHelpList").removeClass("hide");
      $("#exploreList").addClass("hide");
      $("#prevewPlanList").addClass("hide");
      $("#applyList").addClass("hide");
      $("#getHelpList").addClass("show");
      });


       
           });
      }
      else if (langtruevaluevalue == 'es_ES' || langtruevaluevalue == 'es'){
      $("#staticHeaderContent").load('https://df/static/apspahbx/staticheaderfootercontent/header_anon_es.html&#39;, function(responseTxt, statusTxt, xhr){
      if(statusTxt == "success")
      var applypathvalue = $('#appLyPath').val();
      $('#apply,#applyList a').attr("href", applypathvalue);
      var perviewvalue = $('#preview').val();
      $('#prevewPlan ,#prevewPlanList a').attr("href", perviewvalue);
      var explorevalue = $('#learnUm').val();
      $('#explore').attr("href", explorevalue);
      var logourlvalue = $('#logourl').val();
      $('#logoheaderurl').attr("href", logourlvalue);
      var contactvalue = $('#contactinfo').val();
      $('#contactca').attr("href", contactvalue);

      $(".langlink_en_US").click( function() {
      var url = "/apspahbx/localeChange";
      $.ajax({
      type: 'GET',
      url: url,
      cache: false,
      data: {lang:"en"}, //parameters go here in object literal form
      success: function(data) {
      var window_url = window.location.href;
      var index=window_url.indexOf("lang=");
      if(index != -1){
      window.location = updateUrlParameter(window_url,'lang', 'en_US' );
      }else{
      location.reload();
      }


      },
      error: function() {}
      });

      });


      $(".show_hide").show();
      $("#chatpopup").click( function() {
      ga('send', 'event', 'header navigation clicks', 'click', 'online chat', 1);
      fetchChatURLLive();
      });

      $("#explore").focusin(function() {
      $(".cc-language-dropdown").hide();
      $(".languages").hide();
      $("#exploreList").removeClass("hide");
      $("#prevewPlanList").removeClass("show");
      $("#applyList").removeClass("show");
      $("#getHelpList").removeClass("show");
      $("#exploreList").addClass("show");
      $("#prevewPlanList").addClass("hide");
      $("#applyList").addClass("hide");
      $("#getHelpList").addClass("hide");
      });

      $(".cc-change-language").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#exploreList").removeClass("hide");
      $(".cc-language-dropdown").show();
      $(".languages").show();

      });

      $("#localeDiv").focusin(function() {
      $(".cc-language-dropdown").hide();
      $(".languages").hide();

      });
      $(".cc-change-language").mouseover(function(){
      $(".cc-language-dropdown").show();
      $(".languages").show();

      });
      $(".cc-change-language").mouseout(function(){
      $(".cc-language-dropdown").hide();
      $(".languages").hide();

      });

      $("#prevewPlan").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#prevewPlanList").removeClass("hide");
      $("#applyList").removeClass("show");
      $("#getHelpList").removeClass("show");
      $("#exploreList").addClass("hide");
      $("#prevewPlanList").addClass("show");
      $("#applyList").addClass("hide");
      $("#getHelpList").addClass("hide");
      });

      $("#apply").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#prevewPlanList").removeClass("show");
      $("#applyList").removeClass("hide");
      $("#getHelpList").removeClass("show");
      $("#exploreList").addClass("hide");
      $("#prevewPlanList").addClass("hide");
      $("#applyList").addClass("show");
      $("#getHelpList").addClass("hide");
      });
      $("#getHelp").focusin(function() {
      $("#exploreList").removeClass("show");
      $("#prevewPlanList").removeClass("show");
      $("#applyList").removeClass("show");
      $("#getHelpList").removeClass("hide");
      $("#exploreList").addClass("hide");
      $("#prevewPlanList").addClass("hide");
      $("#applyList").addClass("hide");
      $("#getHelpList").addClass("show");
      });


      });
      }
      /*loading static content for header end here */



      });

      function updateUrlParameter(url, param, value) {
      var regex = new RegExp('(' + param + '=)[^\&]+');
      return url.replace(regex, '$1' + value);
      };

      </script>
      <script type="text/javascript">


      function openlocaPopupHeader1(){
      var $locapopup11 = $('#loca-popup11').dialog({
      title: locateAssistancePopUp.title,
      autoOpen: false,
      height: 800,
      modal: true,
      width: 1200,
      buttons: [{
      text: locateAssistancePopUp.closeButtonText,
      title: locateAssistancePopUp.closeButtonText,
      click: function() {
      $(this).dialog('close');
      }
      }]
      });
      $locapopup11.dialog('open');
      document.getElementById('moodleform1').submit();

      }

      </script>
              <script>
              function showList(elt) {
      var id = $(elt).find("a").attr("id");
      $("#"+id+"List").removeClass("hide");
      $("#"+id+"List").addClass("show");
      }
      function hideList(elt) {
      var id = $(elt).find("a").attr("id");
      $("#"+id+"List").removeClass("show");
      $("#"+id+"List").addClass("hide");
      }
      function hideHelp(){
      $("#getHelpList").removeClass("show");
      $("#getHelpList").addClass("hide");
      }
                
        </script>




      <!-- getting user Role id -->
      <input type="hidden" id="fetchLiveChatURL" value='https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=portletInstance_11&amp;_urlType=resource&amp;_portlet.renderResource=true&amp;_resId=fetchChatURL&amp;_resca=cacheLevelPage&amp;_rrparams=&#39;>
      <input type="hidden" id="userIdForChat" value=""></input>







      <div id="loca-popup11" style="display:none;">
              <div class="form">
                  <div class="row">
                            
                   <form id="moodleform1" target="myframe1" method="get" action="https://df/hix/broker/search?iframe=yes">
      <input type="hidden" name="anonymousFlag" value="Y">
      <input type="hidden" name="recordType" value="null">
      <input type="hidden" name="recordId" value="null">
      <input type="hidden" name="lang" value="en">
                          <iframe name="myframe1" title="Local Assistance" width="1167" height="600" class="autoHeight" width="100%" height="600px" frameborder="0" scrolling="auto"></iframe>
                      </form>
                    </div>
                    
                    
      </div>
      </div>

      </head>
      <body>
      <div id="staticHeaderContent">

      </div>
       
      <!-- END Header -->


      </div></div><script type="text/javascript">
               var wlp_title_repl_C_t_portletInstance_11_elem = document.getElementById('wlp_title_repl_C_t_portletInstance_11');
               if (wlp_title_repl_C_t_portletInstance_11_elem != null) wlp_title_repl_C_t_portletInstance_11_elem.innerHTML = 'Header';
               </script></div><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-flow-vertical " style="width: 100%"><div></div><a name="wlp_loginPage"></a><div id="loginPage" class="wlp-bighorn-window "><div class="wlp-bighorn-titlebar"></div><div class="wlp-bighorn-window-content">



      <!doctype HTML>
      <html>
      <head>
      <link rel="stylesheet" href='https://df:443/apspahbx/skins/acquity/css/main.css&#39; type="text/css" property="stylesheet" />
      <link rel="stylesheet" href='https://df:443/apspahbx/skins/acquity/css/print.css&#39; type="text/css" media="print" property="stylesheet" />
      <script type="text/javascript" src='https://df:443/apspahbx/skins/acquity/js/jquery-1.9.1.min.js&#39;&gt;&lt;/script>
      <script type="text/javascript" src='https://df:443/apspahbx/skins/acquity/js/common.js&#39;&gt;&lt;/script>
      <script type="text/javascript" src='https://df:443/apspahbx/skins/acquity/js/main.js&#39;&gt;&lt;/script>
      <script type="text/javascript" src='https://df:443/apspahbx/skins/acquity/js/sprint3_help.js&#39;&gt;&lt;/script>

      <link rel="stylesheet" href='https://df:443/apspahbx/skins/acquity/css/main.css&#39; type="text/css" property="stylesheet" />
      <link rel="stylesheet" href='https://df:443/apspahbx/skins/acquity/css/global.css&#39; type="text/css" property="stylesheet" />
      <link rel="stylesheet" href='https://df:443/apspahbx/skins/acquity/css/grid.css&#39; type="text/css" property="stylesheet" />
      <link rel="stylesheet" href='https://df:443/apspahbx/skins/acquity/css/svg-style.css&#39; type="text/css" property="stylesheet" />
      <!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet"> -->


      <script type="text/javascript" src='https://df:443/apspahbx/skins/acquity/js/modernizr-custom.js&#39;&gt;&lt;/script>
      <script type="text/javascript" src='https://df:443/apspahbx/skins/acquity/js/jquery-1.9.1.min.js&#39;&gt;&lt;/script>


      <script type="text/javascript" src='https://df:443/apspahbx/scripts/datepicker.js&#39;&gt;&lt;/script>


      <script type="text/javascript" src='https://df:443/apspahbx/scripts/datepicker-es.js&#39;&gt;&lt;/script>

      <script type="text/javascript" src='https://df:443/apspahbx/scripts/ruei_library.js&#39;&gt;&lt;/script>
      <script type="text/javascript" src="/apspahbx/scripts/ruei_library_v2.js"></script>



      <script type="text/javascript">
      var browser=window.location.href;

      var msgCancelAllChanges=$('#cancelAllChanges').val();
      var msgYesButtonGlobal=$('#YesGlobal').val();
      var msgNoButtonGlobal=$('#NoGlobal').val();

      window.history.forward();
      var is_firefocurl = navigator.userAgent.toLowerCase().indexOf('fox') > -1;
      {
      if(is_firefocurl)
      {
      var storedHash = window.location.hash;

      window.setInterval(function () {
      if (window.location.hash != storedHash) {
      window.location.hash = storedHash;

      }
      }, 50);
      }
      }
      var is_Safari = navigator.userAgent.toLowerCase().indexOf('safari')> -1;
      {
      if(is_Safari)
      {
      var storedHash = window.location.hash;

      window.setInterval(function () {
      if (window.location.hash != storedHash) {
      window.location.hash = storedHash;

      }
      }, 50);
      }
      }
              function noBack(){
              
               var is_fire = navigator.userAgent.toLowerCase().indexOf('fox') > -1;
               var is_IE = navigator.userAgent.toLowerCase().indexOf('msie') > -1;
                          
               if(is_IE==true){
                  window.history.forward();
                  setTimeout("noBack()", 0);
               }else{
               changeHashOnLoad();
               }
                   /* if(!is_fire)
                    {
               window.history.forward();
                    }
                    else
                    {
                     changeHashOnLoad();
                    }*/
      }
               
              function changeHashOnLoad() {
              
               var browserurl = window.location.href.indexOf('#') > -1;
              
                  if(!browserurl)
                  {
                     window.location.href += "#";
                  }
                  setTimeout("changeHashAgain()", "50");
             }
              
             function changeHashAgain() {
           if (window.location.href.indexOf('#') > -1 ) {
                window.location.href += "1";
           }
             }
      /*
      Method to disable the individual based on the Application Mode and the member passed in session.
      */
      function disableMemberBasedOnAppMode(memberDiv){

      var applicationMode = "null";
      var totalMemberCount = null;
      /*
      made changes for the defect<13815>:continue button
      */
      if(false==true){
      enableMemberOnPage(memberDiv, totalMemberCount, -1);
      }
      else if(applicationMode=="APPLY" ){

      } else if(applicationMode=="MAINTAIN_VIEW"){

      enableMemberOnPage(memberDiv, totalMemberCount, -1);
      } else if(applicationMode=="MAINTAIN_EDIT") { // || applicationMode=="MAINTAIN_NEW"){

      enableAllMemberOnPage(memberDiv, totalMemberCount);
      }
      }
      /*
      Method to enable all the elements on the page
      */
      function enableAllMembers(memberDiv){
      totalMemberCount = null;
      enableAllMemberOnPage(memberDiv,totalMemberCount)
      }

      /*
      Following two methods takes care of the enabling/disabling
      members on page which shows information of only one member
      */
      function disbleMmbrOnPgWthSnglRec(memberDiv){
      var applicationMode = "null";

      if(false==true){
      disablingElement(memberDiv);
      }
      else if(applicationMode=="MAINTAIN_VIEW"){
      disablingElement(memberDiv);
      }
      }

      function disableFormElements(disableAttribute){
      if(false==true){
      disablingElement(disableAttribute);
      }
      }
      /*
      Enabling the member
      */
      function enableMmbrOnPgWthSnglRec(memberDiv){
      enablingElement(memberDiv);
      }
      function fun()
      {
      var browser1=window.location.href;

      if(browser1!=browser)
      {
      noBack();
      }

      }

      var msgCloseButtonGlobal = 'Close';
      </script>
      <style id="antiClickjack">body{display:none !important;}</style>
      <script type="text/javascript">
          if (self === top) {
              var antiClickjack = document.getElementById("antiClickjack");
              antiClickjack.parentNode.removeChild(antiClickjack);
          } else {
              top.location = self.location;
          }
      </script>
      </head>
       
      <body onload="noBack();" onunload="fun();">
      <script type="text/javascript">
      var globalStaticPath = '/apspahbx';
      var msgDelete = 'Delete';
      var msgOk = 'Ok';
      var msgCancel = 'Cancel';
      var msgSaveNExit = 'Save and Exit';
      var msgRemove = 'Remove Member';
      var paynow = 'Individual:Payment Box';
      var msgVerify = 'Verify';
      var saveNExitTitle = 'Save & Exit';
      var saveNExitOK = 'OK';
      </script>



      <div id="save_exit_popup_normal" style="display: none; height: auto !important;">
             <div class="form">
                  <div class="row">
                   <div class="divided p100 helpcontent">
      <p>Your application has been saved, but it has not been submitted. You have until null to complete and submit your application.</p>
               </div>
               </div>
              </div>
         </div>


      </body>
      </html>
      <!-- defect 5211 fix to avoid double click-->
       <script>
      $(document).ready(function(){
      document.ondblclick = function(){
        return false;
        }
      });
       </script>



      <script type="text/javascript">

      window.setInterval(function(){
      displaySessionTimeout();
      }, 1000);

      var sessionTimeout = 899;
      var sessionTime = sessionTimeout;
      var redirectFlag = false;
      var confirmFlag = true;

      function displaySessionTimeout()
      {

          sessionTimeout = sessionTimeout - 1;
      if (confirmFlag && sessionTimeout > 0 && sessionTimeout<=120 )
           {
      var lastFocus = document.activeElement;
      confirmFlag = false;
        $( "#dialog-confirm" ).dialog({
        resizable: true,
        height:240,
        modal: true,
        buttons:
      { Continue:{
      'class': 'rightButton',
      text: 'Continue',
      title: 'Continue',
      click : function (){
      $( this ).dialog( "close" );
      lastFocus.focus();
      extendSessionTimeout() ;
      }
      }
      },
      closeOnEscape: false
        });
       
        $('a.ui-dialog-titlebar-close', $('#ui-dialog-title-dialog-confirm').parent()).remove();
           }

          if ((sessionTimeout <= 0) && (redirectFlag == false))
          
          {
           sessionTimeout = sessionTime;
           redirectFlag = true;
           window.location.href='/apspahbx/signout';
           }
           
      }

      function extendSessionTimeout()
      {
      sessionTimeout = 899 ;
      confirmFlag = true;
      var url = "/apspahbx/ahbxExtendSession";
      $.ajax({
      url: url,
      data: {}, //parameters go here in object literal form
      type: 'GET',
      success: function(data) {
      $.ajax({
      type : 'GET',
      url : '/apspahbx/api-auth/jwt-token',
      contentType : 'application/json',
      success : function(data) {
      if(typeof localStorage !== 'undefined') localStorage.setItem('jwt', data.encodedToken);
      }
      });
      },
      error: function() {}
      });

      }

      </script>


      <title>Answer Question</title>





      <script type="text/javascript"
      src='https://df:443/apspahbx/scripts/datepicker.js&#39;&gt;&lt;/script>
      <script type="text/javascript"
      src='https://df:443/apspahbx/scripts/spin.min.js&#39;&gt;&lt;/script>
      <script type="text/javascript"
      src='https://df:443/apspahbx/scripts/spin.js&#39;&gt;&lt;/script>
      <script type="text/javascript"
      src='https://df:443/apspahbx/styles/css/showLoading.css&#39;&gt;&lt;/script>
      <link rel="stylesheet" href="/apspahbx/skins/acquity/css/google_font.css" type="text/css" property='stylesheet' />
      <link rel="stylesheet" href="/apspahbx/skins/acquity/css/calheers_application.css" type="text/css" property='stylesheet' />
      <script type="text/javascript">
      var oneTimePwdConf = 'One Time Passcode Confirmation';
      var continueConfmOneOpt='Continue';
      var optOutConfm='Opt Out Confirmation';
      $(document).ready(function (){
      $(".jqSkipQues").click(function(){
      $("#skipQuesId").val("true");
      $("#answerId").val("");
      $("#skipQuesAndContinue").val("");
      $('#answerSecurityQuestionForm').submit();

      });
      $("#continueButton").click(function(){
      $("#skipQuesAndContinue").val("true");
      $('#answerSecurityQuestionForm').submit();
      });
      var maximumPopUpHeader='Maximum Number of Attempts Reached';
      var okButton='OK';

      $showExhustedPopUp= $('#maximumAttemptsPopUp').dialog({
      title: '<a class="popupTitle" href="#" role="label">'+maximumPopUpHeader+'</a>',
      autoOpen: false,
      height: 'auto',
      modal: true,
      width: 500,
      buttons: [{
      text: okButton,
      title: okButton,
      click: function() {
      $(this).dialog('close');
      $("#answerSecurityQuestionForm").attr("action", $("#verificationMethodURL").val());
      $("#answerSecurityQuestionForm").submit();
      }
      }]
      });
      if($("#showMaximumExhaustedPopUpID").val()=='true'){
      $showExhustedPopUp.dialog('open');
      }else {
      $showExhustedPopUp.dialog('close');
      }

      });

      </script>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

      <body>
      <div id="wrapper" class="section">
      </br>
      <div class="clearfix two-columns">
      <section id="content">
      <form id="answerSecurityQuestionForm" action="https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=loginPage&amp;_urlType=action&amp;wlploginPage_javax.portlet.action=verifyAnswerSecurityQuestion" method="post" autocomplete="off">
      <input type="hidden" name="_tk" value="eecf770b-39aa-4999-bc3c-3d3fcc8b0e45" />

      <article>
      <input id="skipQuesAndContinue" name="action" type="hidden" value=""/>
      <div class="login-box1 clearfix"
      style="width: 55%; text-align: left;">
      <h2 style="margin-left: 135px;">Answer Question </h2>

      <input type="hidden" id="verificationMethodURL" value="https://df:443/apspahbx/login.portal?_nfpb=true&amp;_st=&amp;_windowLabel=loginPage&amp;_urlType=action&amp;wlploginPage_javax.portlet.action=verificationMethod"/>
      <input id="showMaximumExhaustedPopUpID" name="maximumExhaustedPopUp" type="hidden" value="false"/>

      <div class="securityLabel" style="text-align: center;"><b>To confirm your identity, please answer the following security question.</b></div>
      </br> </br>




      <div class="question" style="margin-left : 15px;">
      <label for="question-id"> Who is your favorite athlete? </label>
      </div>
      <div style="width: 100%; overflow: hidden; margin: 12px 0px 12px 4px;" >
      <div style="float: left; font-weight: bold; width: 25%;">
      <label for="answerId" style="margin-left: 12px; margin-top: 7px; float: left;">
      Response</label>
      <span style="float: left; margin-top: 4px; margin-left: 4px;" class="req" id="answer">* </span>
      </div>
      <div style="float: left; width: 75%;">
      <input id="answerId" name="answer" style="background: transparent none repeat scroll 0% 0%; width: 70%;" class="text" aria-required="true" type="password" value="" maxlength="100"/>
      <input id="questionId" name="questionId" type="hidden" value="121"/>
      </div>
      <input id="skipQuesId" name="skipQues" type="hidden" value=""/>

      </div>


      <ul id="linkList">
      <li style="width:100%;"><a href="#" title="Skip Question" class="jqSkipQues" style="text-decoration: underline;">Skip Question</a></li>
      <li style="width:100%;"><a href="#" title="Forgot Answer?" class="jqSkipQues" style="text-decoration: underline;">Forgot Answer?</a></li>
      </ul>

      <div class="multipleuser-buttons buttons">
      <input type="button" role="button" style="margin-left: 175px; margin-top: 20px;"
      value="Continue"
      title="Continue"
      class="float-right ui-state-default" id="continueButton">

      </div>
      </div>
      </article>
      <div id="maximumAttemptsPopUp">
      <div class="form">
      <div class="row">
      <div class="divided p100 helpcontent">
      <p>
      You have reached the maximum number of attempts for verifying your identify. You will need to select another option to verify your identity on the next page.
      </p>
      </div>
      </div>
      </div>
      </div>
      </form>

      </section>
      </div>

      </br>
      </div>
      </body>









      </div></div><script type="text/javascript">
               var wlp_title_repl_C_t_loginPage_elem = document.getElementById('wlp_title_repl_C_t_loginPage');
               if (wlp_title_repl_C_t_loginPage_elem != null) wlp_title_repl_C_t_loginPage_elem.innerHTML = 'loginPage';
               </script><script type="text/javascript">
                      function wlp_loadNamedAnchor(anchor) {
                          window.location.hash='#'+anchor;
                      }
                      if(window.addEventListener) {
                          window.addEventListener('load',function() { wlp_loadNamedAnchor("wlp_loginPage") },false);
                      }
                      else if(window.attachEvent) {
                          window.attachEvent('onload',function() { wlp_loadNamedAnchor("wlp_loginPage") });
                      }
                  </script></div><div class="wlp-bighorn-layout-cell wlp-bighorn-layout-flow-vertical wlp-bighorn-layout-flow-last" style="width: 100%"><div></div><div id="portletInstance_19" class="wlp-bighorn-window "><div class="wlp-bighorn-titlebar"></div><div class="wlp-bighorn-window-content">



      <!doctype HTML>
      <html>
      <head>

      <script type="text/javascript">
      window.history.forward();
      var is_firefocurl = navigator.userAgent.toLowerCase().indexOf('fox') > -1;
      {
      if(is_firefocurl)
      {
      var storedHash = window.location.hash;

      window.setInterval(function () {
      if (window.location.hash != storedHash) {
      window.location.hash = storedHash;

      }
      }, 50);
      }
      }
      var is_Safari = navigator.userAgent.toLowerCase().indexOf('safari')> -1;
      {
      if(is_Safari)
      {
      var storedHash = window.location.hash;

      window.setInterval(function () {
      if (window.location.hash != storedHash) {
      window.location.hash = storedHash;

      }
      }, 50);
      }
      }
         function noBack(){
            var is_fire = navigator.userAgent.toLowerCase().indexOf('fox') > -1;
               var is_IE = navigator.userAgent.toLowerCase().indexOf('msie') > -1;
                          
               if(is_IE==true){
                  window.history.forward();
                  setTimeout("noBack()", 0);
               }else{
               changeHashOnLoad();
               }
            }
               
              function changeHashOnLoad() {
              
               var browserurl = window.location.href.indexOf('#') > -1;
              
                  if(!browserurl)
                  {
                     window.location.href += "#";
                  }
                  setTimeout("changeHashAgain()", "50");
             }
              
             function changeHashAgain() {
           if (window.location.href.indexOf('#') > -1 ) {
                window.location.href += "1";
           }
             }
             
             var msgCloseButtonGlobal = 'Close';

      </script>
      <style id="antiClickjack">body{display:none !important;}</style>
      <script type="text/javascript">
          if (self === top) {
              var antiClickjack = document.getElementById("antiClickjack");
              antiClickjack.parentNode.removeChild(antiClickjack);
          } else {
              top.location = self.location;
          }
      </script>
      </head>
       
      <body onload="noBack();">
      <script type="text/javascript">
      var globalStaticPath = '/apspahbx';
      var msgDelete = 'Delete';
      var msgOk = 'Ok';
      var msgCancel = 'Cancel';
      var msgSaveNExit = 'Save and Exit';
      var msgRemove = 'Remove Member';
      var paynow = 'Individual:Payment Box';
      var msgVerify = 'Verify';
      var selectOne = 'Select One';


      </script>


      </body>
      </html>

      <!doctype HTML>




      <input type= "hidden" id="langvalue1" value="en_US" />


      <script>

      function fetchChatURLLive() {
      var liveChat = "";
      var url = $("#fetchLiveChatURL").attr("value");
      $.getJSON(url, function(chatURL) {
      liveChat = chatURL;
      window.open(liveChat,'','width=900,height=600,toolbar=no,status=no,menubar=no,location=no,scrollbars=yes,resizable=no,titlebar=no');
      });

      }

      $(document).ready(function(){
      var isProdSupportUserlogin = 'false';
      if(isProdSupportUserlogin){
      $('#nonProdUserFooter').hide();
      }

      $("#chatpopuplv").click( function() {
      fetchChatURLLive();
      });
      });
      </script>
      <script>
      /** Terms & Conditions of Use | Privacy Policy **/
          var helpPopUp = {
      title: "Use of This Website",
      closeButtonText: "Close"
      };


      var iframePropCCA = " height='350px' width='100%' scrolling='auto' style='overflow-x: hidden;' frameborder='0'";
      var iframeSrcTermsConditions = "<iframe src='https://www.df.com/privacy/terms/terms.html&#39;" + iframePropCCA +">Term and Condition</iframe>"
      var iframeSrcPrivacy = "<iframe src='https://www.df.com/privacy&#39;" + iframePropCCA + ">Privacy Policy</iframe>"
      var termsCondPopUp = {
      titleTermsCondPopup: "Terms and Conditions of Use",
      titlePrivacyPopup: "Notice of Privacy Practices",
      closeText: "Close"
      };


      $(document).ready(function(){
      /** Common Popup for Terms & Conditions of Use and Privacy Policy **/
      var $ccaTermsAndConditionsPopup = $('#ccaTermsAndConditions-popup').dialog( {

      title : '<a class="popupTitle" href="#" role="label">'+termsCondPopUp.titleTermsCondPopup+'</a>',
      autoOpen : false,
      height : 500,
      modal : true,
      width : 640,
      resizable : true,
      close: function(){$(this).html('');},
      buttons : {
      Close:{
      'class': 'rightButton',
      text: termsCondPopUp.closeText,
      title: termsCondPopUp.closeText,
      click : function (){
      $(this).html('');
      $(this).dialog('close');
      $(".ccaTermsConditionsLink").focus();

      setTimeout(function() {$(".ccaTermsConditionsLink").focus(); }, 1);
      }
      }
      }
      });

      var $ccaTermsAndConditionsPopup1 = $('#ccaPrivacyPolicy-popup').dialog( {

      title : '<a class="popupTitle" href="#" role="label">'+termsCondPopUp.titlePrivacyPopup+'</a>',
      autoOpen : false,
      height : 500,
      modal : true,
      width : 640,
      resizable : true,
      close: function(){$(this).html('');},
      buttons : {
      Close:{
      'class': 'rightButton',
      text: termsCondPopUp.closeText,
      title: termsCondPopUp.closeText,
      click : function (){
      $(this).html('');
      $(this).dialog('close');
      $(".ccaPrivatePolicyLink").focus();

      setTimeout(function() {$(".ccaPrivatePolicyLink").focus(); }, 1);
      }
      }
      }
      });


      $('.ccaTermsConditionsLink').click(function() {
      $ccaTermsAndConditionsPopup.html(iframeSrcTermsConditions);
      $ccaTermsAndConditionsPopup.dialog('open');
      $(".popupTitle").focus();
      $ccaTermsAndConditionsPopup.dialog().prev().find(".ui-dialog-titlebar-close").click(function(){

      $ccaTermsAndConditionsPopup.dialog('close');

      $(".ccaTermsConditionsLink").focus();

      setTimeout(function() {$(".ccaTermsConditionsLink").focus(); }, 1);

      });
      });

      $('.ccaPrivatePolicyLink').click(function() {
      $ccaTermsAndConditionsPopup1.html(iframeSrcPrivacy);
      $ccaTermsAndConditionsPopup1.dialog('open');
      $(".popupTitle").focus();
      $ccaTermsAndConditionsPopup1.dialog().prev().find(".ui-dialog-titlebar-close").click(function(){

      $ccaTermsAndConditionsPopup1.dialog('close');

      $(".ccaPrivatePolicyLink").focus();

      setTimeout(function() {$(".ccaPrivatePolicyLink").focus(); }, 1);

      });
      });


      var langtruevaluevalue = $('#langvalue1').val();
      if (langtruevaluevalue == 'en_US' || langtruevaluevalue == '' || langtruevaluevalue == ' ' ||langtruevaluevalue == 'en'){
      $("#staticFooterContent").load('https://df/static/apspahbx/staticheaderfootercontent/footer_en.html&#39;, function(responseTxt, statusTxt, xhr){
                if(statusTxt == "success")
               $("#chatpopuplv").click( function() {
         fetchChatURLLive();
         });
            });
      }else if (langtruevaluevalue == 'es_ES' ||langtruevaluevalue == 'es'){
      var footerspaceremove = $.trim('https://df/static/apspahbx/staticheaderfootercontent/footer_es.html ');
      $("#staticFooterContent").load(footerspaceremove , function(responseTxt, statusTxt, xhr){
      if(statusTxt == "success")
      $("#chatpopuplv").click( function() {
      fetchChatURLLive();
      });
      });
      }
      });

      </script>


      <head>
      <title>Title</title>
      </head>
      <div id="staticFooterContent">

      </div>

      <footer class="copyright">
      <p>Copyright.</p>

      <p>

      <a href="https://df:8443/deployments?env=ENV04&refresh=true" target="_blank"><p>Build Version Id</a>

      &nbsp;&nbsp;|
      &nbsp;&nbsp;Runmode: dev</p>

      <p>



      <li class="first">

          &nbsp;&nbsp;Current date/time from TimeShifter: Wed Nov 29 08:23:56 PST 2017
      </li>
      <br/>
      <li class="first">
          Env name:&nbsp;&nbsp;|
          &nbsp;&nbsp;<a href="TimeShifterWeb" target="_blank">TimeShifter</a>&nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="devtools/devtools/devconsole" target="_blank">Developer Console</a>
      </li>


      </p>
      </footer>

      <input type="hidden" id="mutiTabOK" value='OK' />
      <div id="multitab-popup" style="display: none;">
      </br>
      </br>
      <p class="aligncenter">We have detected that you are logged in to your account in more than one window or tab.</p></br>
      <p class="aligncenter">We cannot support more than one log in session open at the same time.</p></br>
      <p class="aligncenter">Please close one to continue.</p></br>
      </div>


      </div></div><script type="text/javascript">
               var wlp_title_repl_C_t_portletInstance_19_elem = document.getElementById('wlp_title_repl_C_t_portletInstance_19');
               if (wlp_title_repl_C_t_portletInstance_19_elem != null) wlp_title_repl_C_t_portletInstance_19_elem.innerHTML = 'Footer';
               </script></div></div></div></div></div></body></html>
      ---------- END SOURCE ----------

        1. LoadContentTest.java
          2 kB
          Priyanka Mangal
        2. login.html
          40 kB
          Priyanka Mangal

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: