Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



iframe

tharoon
03-31-2005, 12:52 AM
How do clear the iframe in netscape 7.0 and Internet explorer. The following code works in IE but not in netscape

<html>
<head>
<title>Simple Math Practice</title>


<script language="javascript" type="text/javascript">
<!-- Hide Script
function RandPosInt() {
Rnum = Math.round(Math.random()*8+1);
return Rnum;
}

function WriteHeader() {
problem.document.write('<html><head><link href="math.css" rel="stylesheet" type="text/css"><\/head><body>');
}

function WriteContent() {
problem.document.write("this is content");
}

function WriteFooter() {
problem.document.write("<\/body><\/html>");
}

function ClearFrame() {
problem.document.open();
problem.document.clear();
}

function CloseFrame() {
problem.document.close();
}


// End Hiding Script -->
</script>


<link href="math.css" rel="stylesheet" type="text/css">
</head>
<body>
<div align="center">
<h1>Simple Math Practice</h1>

<iframe
src="defaultframe.html" id="problem" name="problem" frameborder="1" marginwidth="10" marginheight="10" scrolling="no" align="top" height="200" width="500">
</iframe>


<script language="javascript" type="text/javascript">
<!-- Hide Script
//FirstNum = RandPosInt();
//problem.document.write("Test1");
ClearFrame();
WriteHeader();
WriteContent();
WriteFooter();
CloseFrame();

// End Hiding Script -->
</script>

</div>
</body>
</html>

RealBlackStuff
03-31-2005, 03:47 AM
That function is no longer supported. See here:
http://www.web-developer-india.com/web/jscript/refp_77.html

Ad
03-31-2005, 03:47 AM
  

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Intel's six-core Gulftown processor benchmarked months early

Another iPhone worm spotted, this time it's dangerous

Stardock CEO: Steam holds 70% of digital game distribution market

Google: Android, Chrome OS to converge eventually

Microsoft to showcase Natal at Gamefest in February

More Tech News

  
 Software Downloads

FlashGot 1.2.0.9

RemoveIT Pro XT - SE 23.11.2009

Vuze (Formerly Azureus) 4.3.0.4

RemoveIT Pro v7 Enterprise 23.11.2009

Aloaha PDF Suite 3.9.172

Blindwrite Suite 6.3.1.5

RemoveIT Pro v7 Ultra 23.11.2009

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.