/    Sign up×
Community /Pin to ProfileBookmark

2 * type=’text/javascript’ dans window.parent frame document

Jai une page index.html qui load son contenu ….

<script type=”text/javascript” language=”JavaScript” src=”test.js”></script>
<script language=”JavaScript”>
test();
</script>

… en appelant la fonction contenue dans test.js…..

function test(){

win=window.document;
win.writeln(‘<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd“>’);
win.writeln(‘<html><head>’);
win.writeln(‘<title>Document sans nom</title>’);
win.writeln(‘<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>’);
win.writeln(‘</head>’);
win.writeln(“<frameset cols=’200,*‘>”);
win.writeln(“<frame name=’menuFrame’/>”);
win.writeln(“<frameset rows=’150,*
,50,0′>”);
win.writeln(“<frame name=’headerFrame’/>”);
win.writeln(“<frame name=’workFrame’/>”);
win.writeln(“<frame name=’footerFrame’/>”);
win.writeln(“<frame name=’dialFrame’/>”);
win.writeln(“</frameset>”);
win.writeln(“</frameset><noframes><body></body></noframes></html>”);

win=window.parent.menuFrame.document;
win.writeln(‘<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd“>’);
win.writeln(‘<html><head>’);
win.writeln(‘<SCRIPT src=”t1.js” type=”text/javascript”></SCRIPT>’);
win.writeln(‘<SCRIPT src=”t2.js” type=”text/javascript”></SCRIPT>’);
win.writeln(‘<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>’);
win.writeln(‘<title>Document sans nom</title>’);
win.writeln(‘<script language=”JavaScript”>make1();</script>’);
win.writeln(‘<script language=”JavaScript”>make2();</script>’);
win.writeln(‘</head><body>’);
win.writeln(‘</body></html>’);

win.location.reload();

}

…qui elle-meme appelle les fonctions des fichiers suivants :

_ t1.js

function make1(){
document.write(“yo1”);
}

_ t2.js

function make2(){
document.write(“yo2”);
}

Le contenu de la frame de gauche apparait si j’exécute en local mais quand je place les pages sur un serveur web et que j’appelle la page sous ie le contenu n’est pas visible mais apparait seulement quand j’actualise la page ou que je la rappelle.
Quand la frame de gauche ne se charge pas et qu’on regarde la source on voit que le code de la page s’arrete dans la fonction test au chargement de t1.js et t2.js or le bug n’apparait pas si je ne charge qu’un js.Quelqu’un aurait-il une solution sachant je suis obligé de garder plusieurs js ?
Merci d’avance !

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@javaNoobieSep 09.2004 — ok.. had to find a translator to translate french.
Jai a index.html page which load its contents....

< script type="text/javascript" language="JavaScript" src="test.js"></script >

< script language="JavaScript" >

test();

</script >

... by calling the function contained in test.js.....

function test(){

win=window.document;

PUBLIC win.writeln(' <!DOCTYPE HTML "-// W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');

win.writeln(' <html><head > ');

win.writeln(' <title>Document without nom</title > ');

win.writeln(' <meta HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1 ">');

win.writeln(' </head > ');

win.writeln("<frameset cols=' 200,*'>");

win.writeln("<frame name=' menuFrame' />");

win.writeln("<frameset rows=' 150, *
, 50, 0 '>");

win.writeln("<frame name=' headerFrame' />");

win.writeln("<frame name=' workFrame' />");

win.writeln("<frame name=' footerFrame' />");

win.writeln("<frame name=' dialFrame' />");

win.writeln("</frameset >");

win.writeln("</frameset><noframes><body></body></noframes></html >");

win=window.parent.menuFrame.document;

PUBLIC win.writeln(' <!DOCTYPE HTML "-// W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');

win.writeln(' <html><head > ');

win.writeln(' <SCRIPT src="t1.js" type="text/javascript"></SCRIPT > ');

win.writeln(' <SCRIPT src="t2.js" type="text/javascript"></SCRIPT > ');

win.writeln(' <meta HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1 ">');

win.writeln(' <title>Document without nom</title > ');

win.writeln(' <script language="JavaScript">make1();</script > ');

win.writeln(' <script language="JavaScript">make2();</script > ');

win.writeln(' </head><body > ');

win.writeln(' </body></html > ');

win.location.reload();

}

... which it-same calls the functions of the following files:


_ t1.js

function make1(){

document.write("yo1");

}

_ t2.js

function make2(){

document.write("yo2");

}

The contents of the frame of left appear if I ex?te locally but when I place the pages on a Web server and that I call the page under IE the contents am not visible but appear only when I bring up to date the page or that I point out it.

When the frame of left does not take care and that the source is looked at it is seen that the code of the page arrete in the function test with the loading of t1.js and t2.js but the bug does not appear if I do not charge that a js.Quelqu' one would have a solution knowing I am oblig?e to keep several js?

Thank you in advance![/quote]
×

Success!

Help @makina spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...