?
Solved

hide/disable nav until iFrames are loaded

Posted on 2005-02-27
5
Medium Priority
?
400 Views
Last Modified: 2011-10-03
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
Comment
Question by:vinny45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 31

Accepted Solution

by:
GwynforWeb earned 2000 total points
ID: 13416637
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
 
LVL 7

Expert Comment

by:Xxavier
ID: 13416677
numFrames=5 in the above.
0
 
LVL 7

Expert Comment

by:Xxavier
ID: 13416679
there could be focus problems but it seems to work ok in the brwoser
0
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 13416691
?
0
 

Author Comment

by:vinny45
ID: 13422043
will try that thanks
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question