Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

hide/disable nav until iFrames are loaded

can someone provide some sample code that will hide navigation until all the iframes has been loaded? here's what my page look like for reference THANKS


<div class="tabArea" id="nav">
      <a class=tab href="javascript:nav('ResumeContactInfoDiv')">Contact Information</a>
                 <a class=tab href="javascript:nav('ResumeObjectiveSkillsDiv')">Objectives/Skills</a>
                 <a class=tab href="javascript:nav('ResumeEducationDiv')">Education</a>
                <a class=tab href="javascript:nav('ResumeWorkInfoDiv')">Work Experience</a>
                <a class=tab href="javascript:nav('ResumeViewResumeDiv')">View Resume</a>
</div><br>
<div id="ResumeViewResumeDiv">
      <IFRAME NAME="ResumeViewResume" id="ResumeViewResume" SRC="../resume/ViewResume.aspx" style="WIDTH: 100%; HEIGHT: 100%"
      align="top" frameBorder="no" width="100%"scrolling="no"></IFRAME>
</div>

<div id="ResumeContactInfoDiv" style="DISPLAY: none">
      <IFRAME NAME="ResumeContactInfo" id="ResumeContactInfo" SRC="../resume/ContactInfo.aspx" style="WIDTH: 100%; HEIGHT: 100%"
      align="top" frameBorder="no" width="100%" scrolling="no"></IFRAME>
</div>

<div id="ResumeObjectiveSkillsDiv" style="DISPLAY: none">
      <IFRAME NAME="ResumeObjectiveSkills" id="ResumeObjectiveSkills" SRC="../resume/ObjectiveSkills.aspx"
      style="WIDTH: 100%; HEIGHT: 100%" align="top" frameBorder="no" width="100%" scrolling="no"></IFRAME>
</div>

<div id="ResumeEducationDiv" style="DISPLAY: none">
      <IFRAME NAME="ResumeEducation" id="ResumeEducation" SRC="../resume/Education.aspx" style="WIDTH: 100%; HEIGHT: 100%"
      align="top" frameBorder="no" width="100%" scrolling="no"></IFRAME>
</div>

<div id="ResumeWorkInfoDiv" style="DISPLAY: none">
      <IFRAME NAME="ResumeWorkInfo" id="ResumeWorkInfo" SRC="../resume/WorkInfo.aspx" style="WIDTH: 100%; HEIGHT: 100%"
      align="top" frameBorder="no" width="100%" scrolling="no"></IFRAME>
</div>
0
vinny45
Asked:
vinny45
  • 2
  • 2
1 Solution
 
GwynforWebCommented:
this perhaps?

<script>
 numFrames=4
 loaded=0
 function testNav(){
  loaded+=1
  if (loaded==numFrames) document.getElementById("nav").style.display='block'
 }
</script>

<div class="tabArea" id="nav" style="display:none">
     <a class=tab href="javascript:nav('ResumeContactInfoDiv')">Contact Information</a>
                 <a class=tab href="javascript:nav('ResumeObjectiveSkillsDiv')">Objectives/Skills</a>
                 <a class=tab href="javascript:nav('ResumeEducationDiv')">Education</a>
                <a class=tab href="javascript:nav('ResumeWorkInfoDiv')">Work Experience</a>
                <a class=tab href="javascript:nav('ResumeViewResumeDiv')">View Resume</a>
</div><br>

<div id="ResumeViewResumeDiv">
     <IFRAME NAME="ResumeViewResume" id="ResumeViewResume" SRC="http://google.com" style="WIDTH: 100%; HEIGHT: 100%"
     align="top" frameBorder="no" width="100%"scrolling="no" onload="testNav()"></IFRAME>
</div>

<div id="ResumeContactInfoDiv" style="DISPLAY: none">
     <IFRAME NAME="ResumeContactInfo" id="ResumeContactInfo" SRC="http://google.com"" style="WIDTH: 100%; HEIGHT: 100%"
     align="top" frameBorder="no" width="100%" scrolling="no" onload="testNav()"></IFRAME>
</div>

<div id="ResumeObjectiveSkillsDiv" style="DISPLAY: none">
     <IFRAME NAME="ResumeObjectiveSkills" id="ResumeObjectiveSkills" SRC="../resume/ObjectiveSkills.aspx"
     style="WIDTH: 100%; HEIGHT: 100%" align="top" frameBorder="no" width="100%" scrolling="no" onload="testNav()"></IFRAME>
</div>

<div id="ResumeEducationDiv" style="DISPLAY: none">
     <IFRAME NAME="ResumeEducation" id="ResumeEducation" SRC="../resume/Education.aspx" style="WIDTH: 100%; HEIGHT: 100%"
     align="top" frameBorder="no" width="100%" scrolling="no" onload="testNav()"></IFRAME>
</div>

<div id="ResumeWorkInfoDiv" style="DISPLAY: none">
     <IFRAME NAME="ResumeWorkInfo" id="ResumeWorkInfo" SRC="../resume/WorkInfo.aspx" style="WIDTH: 100%; HEIGHT: 100%"
     align="top" frameBorder="no" width="100%" scrolling="no" onload="testNav()"></IFRAME>
</div>
0
 
XxavierCommented:
numFrames=5 in the above.
0
 
XxavierCommented:
there could be focus problems but it seems to work ok in the brwoser
0
 
GwynforWebCommented:
?
0
 
vinny45Author Commented:
will try that thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now