1 Reply Latest reply on Jun 19, 2006 9:33 AM by flooker

    IFRAME Load Wait Message

    flooker Level 1
      Guys i am runnin into a problem . hope can get solution here .

      Page A.cfm calling Page B.cfm through invisible iframe on Click Event of radio bnutton

      Code Page A

      <script>
      function Pop_Drp_dwn(){
      AltLoadFrame.document.location = B.cfm?Test='+Val_test;
      }
      </script>

      Hub: <input type="radio" name="All" id="All" class="checkbox" value="Hub" onClick="Pop_Drp_dwn(this.value);">
      <select name="origin_hub" id="origin_hub" style="width:150px " class="textbox">
      <option value=""></option>
      </select>

      Page B.cfm will run a Query will get the results in the background and will populate the parent origin_hub select menu dynamically.

      Problem: how to dispaly a message or alert or some thing to the user like "Loading / Select Menu loading" while Iframe running a Query and populating Select in the A.cfm ? and that display loading message will go away Once Iframe Done populating.

      Many Thanks in Advance .

        • 1. Re: IFRAME Load Wait Message
          flooker Level 1
          Never mind I think i did it . For those who do not know . here is the Code
          Page A
          <script>
          var count = 0;
          </script>

          <script>
          function statechange(get){
          count++;
          var inner = document.getElementById("loadframe");
          if (count > 2){
          if (get.readyState == 'complete')
          {
          inner.innerHTML = '';
          inner.innerHTML = 'Loaded';
          }
          else
          inner.innerHTML = 'Select Menu Loading Please Wait';
          }
          }

          function Pop_Drp_dwn(Val){
          document.frmMyMRS.origin_hub.disabled = true;
          AltLoadFrame.document.location = 'sliclist.cfm?pop_drp='+Val+'&Page=Incompatible';
          }

          </script>

          Hub: <input type="radio" name="All" id="All" class="checkbox" value="Hub" onClick="Pop_Drp_dwn(this.value);">
          <td>
          <select name="origin_hub" id="origin_hub" style="width:150px " class="textbox">
          <option value=""></option>
          </select> <div id="loadframe"></div></td>

          .
          <iframe name="AltLoadFrame" width="0" height="0" src="sliclist.cfm" onreadystatechange="statechange(this);"></iframe>

          I dont think there is any other esiest way to do this .
          Enjoy .