** IE5, IE6 and NETSCAPE COMPATIBILITY PROBLEM **

F

Federico Bari

Good morning all from italy,

i have probably a compatibility problem with a html/javascript page.
The aim of the code of the file test.htm you find here following (copy the
3 files in the
same directory) is to change the content of a layer, created with the
<div...> tag, with an external text (clicking over an hiperlink) or with the
result of a <form...> submition. The solution (I haven't been able to find
anyone else) is to use a hidden <iframe...> as temporary container of the
text request or the form aswer, and then take its content with javascript
functions and copy it in the layer. It work, but just with IE 6. I tried
with IE 5, but it doesn't work. It don't know with Netscape. Somebody know
where is the problem and if I can do in a different manner? Thank you very
much,

Federico.


***************
this is the file test.htm
*****************

<!-- saved from url=(0022)http://internet.e-mail -->
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if
((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
if ((obj=MM_findObj(objName))!=null) with (obj)
if (document.layers) {document.write(unescape(newText));
document.close();}
else innerHTML = unescape(newText);
}
function showText(){
theText = window.textFile.document.body.innerHTML;
MM_setTextOfLayer('Layer1','',theText)
}
//-->
</script>
</head>
<html>

<body>
<div id="Layer1" style="position:absolute; left:218px; top:120px;
width:205px; height:134px; z-index:1"></div>
<form>
<iframe id="textFile" name="textFile" style="display:none"
onLoad="showText()"></iframe>
<input type=button value=Hallo onClick="window.textFile.location =
'testo.txt'">
</form>
<form action="script.php" method="post" target="textFile"><input
name="testo" type="text"><input value="submit html test"
type="submit"></form>
<p>&nbsp;</p>
<p onClick="window.textFile.location = 'testo.txt'"><u><font
color="#0000FF">test</font></u>
</p>
</body>
</html>
-----------------------------------



*************************
this is the file script.php
***************************

<%@LANGUAGE="JAVASCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<? echo("this is a test: $testo"); ?>
</body>
</html>

----------------------------------------



*****************
this is the file testo.txt
*******************

this is a test file!!!
 
D

DU

Federico said:
Good morning all from italy,

i have probably a compatibility problem with a html/javascript page.
The aim of the code of the file test.htm you find here following (copy the
3 files in the
same directory) is to change the content of a layer, created with the
<div...> tag, with an external text (clicking over an hiperlink) or with the
result of a <form...> submition. The solution (I haven't been able to find
anyone else) is to use a hidden <iframe...> as temporary container of the
text request or the form aswer, and then take its content with javascript
functions and copy it in the layer. It work, but just with IE 6. I tried
with IE 5, but it doesn't work. It don't know with Netscape. Somebody know
where is the problem and if I can do in a different manner? Thank you very
much,

Federico.

In how many newsgroupS have you multi-posted this message? In which
newsgroupS do you want alt.html people to answer you exactly?

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
F

Federico Bari

.... mine could be an html problem or a java problem. Since i don't know if a
java or html problem i posted mine question in two newsgroup: html and
javascript news group. That's all. Caould you give me a suggestion about
that problem? Thank you very much. Federico.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top