Google Answers Logo
View Question
 
Q: Need to replace inline frames to work inside netscape and internet explorer ( No Answer,   3 Comments )
Question  
Subject: Need to replace inline frames to work inside netscape and internet explorer
Category: Computers > Programming
Asked by: swykpisz-ga
List Price: $3.00
Posted: 04 Mar 2003 19:05 PST
Expires: 03 Apr 2003 19:05 PST
Question ID: 171019
What can I do to replace the inline frames and get the same result
that will work woth both Netscape and Internet Explorer? The code is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  
<head>  
    <title>Sample: Your Daily Link</title>  
<SCRIPT LANGUAGE="JavaScript">
function myprint() {
window.parent.news.focus();
window.print();
}

</script>
</head>  
<body>  
<!--<input type=button value="Print Right Frame"
onClick="myprint()">-->
<a href="javascript:myprint()">Print The Frame</a> 
<!--<h1>Sample: Your Daily Link</h1>  
<h2>Here's the linked page of the day:</h2>-->  
 
<div align="center"> 
                  <center> 
                  <table border="1" cellpadding="0" cellspacing="0"
style="border-collapse: collapse" bordercolor="#808080" width="400">
                   
                    <tr> 
                <td height="1" background="images/bkgrnd.gif"
width="100%" align="left" valign="bottom">
             
                <a href="newsframe.htm" target="news"> 
                </a></td>
                    </tr> 
                    <tr> 
                <td height="300" bgcolor="#FFFFFF" valign="top"
align="center">
             
                <table border="0" cellpadding="3" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111" width="100%"
id="AutoNumber6">
                  <tr> 
                    <td width="100%">
<script type="text/javascript"><!--  
var linkList = new Array();  
var i = 1;  
var todaysLink = "";  
var linkHtml = "";  
var dateNow = new Date();  
var dayOfMonth = dateNow.getDate();  
  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://home.earthlink.net/~wykpisz/just-trying.txt";
linkList[i++] = "http://home.earthlink.net/~wykpisz/again.txt";  
linkList[i++] = "http://home.earthlink.net/~wykpisz/just-trying.txt";
linkList[i++] = "http://home.earthlink.net/~wykpisz/again.txt";  
linkList[i++] = "http://home.earthlink.net/~wykpisz/just-trying.txt";
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://home.earthlink.net/~wykpisz/again.txt";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.org";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.org";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.org";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.org";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.org";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.org";  
linkList[i++] = "http://example.net";  
linkList[i++] = "http://www.example.com";  
linkList[i++] = "http://www.example.com";  
  
todaysLink = linkList[dayOfMonth];  
document.writeln('<iframe name="news" border="0" frameborder="0"
width="100%" height="252" src="' + todaysLink + '" align="top"
target="_top">');
document.writeln('Your browser does not support inline frames or is
currently configured not to display inline frames.');
document.writeln('</iframe>');
</script>            

             
</td> 
 
 
  
</body>  
</html>
Answer  
There is no answer at this time.

Comments  
Subject: Re: Need to replace inline frames to work inside netscape and internet explorer
From: jdog-ga on 04 Mar 2003 22:56 PST
 
you can do that if you're willing to have daily CONTENT as opposed to
full blown daily PAGES. If you choose to do that, though, I would
suggest unsing an extern js file for neatness.
Subject: Re: Need to replace inline frames to work inside netscape and internet explorer
From: swykpisz-ga on 06 Mar 2003 07:20 PST
 
Where would I be able to find something like that?
Subject: Re: Need to replace inline frames to work inside netscape and internet explorer
From: jdog-ga on 07 Mar 2003 20:27 PST
 
if that's what you wanted to do, you would create a text file named
"something.js" and copy over the script you have already (as a
starting point). Then you would change it so the array would contain
strings of html instead of URIs. Then you could just have the function
"document.write()" the proper element of the array into the page (at
the spot you call the function). The problem with this is that your js
file could get rather large, and you would often be transferring
unneeded data to the client. If this is a problem, there's another way
you could do it (in javascript), but it's a little bit of a pain.

Oh, and you would change your scipt tag to <SCRIPT
LANGUAGE="JavaScript" SRC="something.js"></SCRIPT> (assuming the js
file is in the same directory).

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy