PDA

View Full Version : DHTML Window Widget Problem with the title



csim
09-30-2007, 02:09 PM
1) Script Title:
HTML Window Widget
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm
3) Describe problem:
First, i'm using a window widget (type : ajax, external file) in a page , the title is correct : "Envoyer à un(e) ami(e)" becomes Envoyer une amie (Send a friend in French)
Then, a new page send an email and calls the first page with parameters.
The first page, reading the parameters, load another window widget (type : ajax, external file) and then the title is not correct : "Envoyer à un(e) ami(e)" becomes Envoyer à un(e) amie.
I have checked the headers from the external files :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
I don't know now where to look at. Have you an idea ?
(Sorry for my bad english)

Code of the first call :

<a href="#" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'envoi_ami/envoi_ami.php?url_encours=http%3A%2F%2Flocalhost%essai&titre_encours=Accueil&root_url=http%3A%2F%2Flocalhost%2Fessai', 'Envoyer &agrave; un(e) ami(e)', 'width=450px,height=300px,left=800px,top=200px,resize=0,scrolling=0,toolbar=0');return false;"><img src="http://localhost/essai/images/www/ico_mail.gif" alt="Envoyer &agrave; un(e) ami(e)" border=0 /></a>

Code of the second call :

function openmypage(url_apres){
ajaxconf=dhtmlwindow.open("ajaxbconf", "ajax", url_apres, "Envoyer &agrave; un(e) ami(e)", "width=450px,height=300px,left=800px,top=200px,resize=0,scrolling=0,toolbar=0");
} in a javascript file

<script type="text/javascript">openmypage('envoi_ami/apres_envoi.php');</script> in the page

ddadmin
10-01-2007, 12:11 AM
So you're saying the title of the DHTML window changes on its own from:


"Envoyer &agrave; un(e) ami(e)"

to:


"Envoyer &agrave; un(e) amie."

It sounds like an encoding problem with me, though without more info, I'm not sure.

p.s: Please format any code in your post using the CODE tag. This makes it a lot easier to read it.

csim
10-01-2007, 01:34 PM
This is the code from the page :
the first open, the title is not correct
the second , with OnClick, the title is correct


<?php
<script type="text/javascript">
ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'envoi_ami/apres_envoi.php', 'Envoyer &agrave; un(e) ami(e)', 'width=450px,height=300px,left=800px,top=200px,resize=0,scrolling=0,toolbar=0');
</script>
<a href="#" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'envoi_ami/envoi_ami.php?url_encours=http%3A%2F%2Flocalhost%2Fessai%2Findex.php%3Fpage%essai&titre_encours=Accueil&root_url=http%3A%2F%2Flocalhost%2Fessai', 'Envoyer &agrave; un(e) ami(e)', 'width=450px,height=300px,left=800px,top=200px,resize=0,scrolling=0,toolbar=0');return false;"><img src="http://localhost/essai/images/www/ico_mail.gif" alt="Envoyer &agrave; un(e) ami(e)" border=0 /></a>
?>

in the page, there is :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

csim
10-01-2007, 01:49 PM
I've cleaned the code in order to read it easier :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>Accueil</title>

<base href="http://localhost/essai/" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel='stylesheet' type='text/css' media='screen' href='stylesheet/general.css' />

<script src="js/dhtmlwindow.js" type="text/javascript"></script>
</head>
<body>
<script type="text/javascript">ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'envoi_ami/apres_envoi.php', 'Envoyer &agrave; un(e) ami(e)', 'width=450px,height=300px,left=800px,top=200px,resize=0,scrolling=0,toolbar=0');</script><a href="#" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'envoi_ami/envoi_ami.php', 'Envoyer &agrave; un(e) ami(e)', 'width=450px,height=300px,left=800px,top=200px,resize=0,scrolling=0,toolbar=0');return false;"><img src="http://localhost/essai/images/www/ico_mail.gif" alt="Envoyer &agrave; un(e) ami(e)" border=0 /></a>
</body>
</html>

I've tried another charset iso-8859-1 in meta, but I've still got the problem.
Thanks
Regards