View Full Version : DHTML Window Widget Problem with Title Next

10-01-2007, 05:06 PM
1) Script Title:
DHTML Window Widget
2) Script URL (on DD):
3) Describe problem:
My title isn't correctly encoded.
I want to be sure where to look at the problem, so I 've modified the page demo.htm from the script :

<p>Play around with Window 3 (Ajax content)</p>

<script type="text/javascript">
function openmypage(){ //Define arbitrary function to run desired DHTML Window widget codes
ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", "windowfiles/external.htm", "Envoyer &agrave; un(e) ami(e)", "width=450px,height=300px,left=300px,top=100px,resize=1,scrolling=1")
ajaxwin.onclose=function(){return window.confirm("Close window 3?")} //Run custom code when window is about to be closed
<li><b><a href="#" onClick="openmypage(); return false">Create/ Open Window 3</a> (in IE, this Ajax demo must be run online!)</b></li>
<li><a href="#" onClick="ajaxwin.moveTo('middle', 'middle'); return false">Center Window 3</a></li>
<li><a href="#" onClick="ajaxwin.load('ajax', 'windowfiles/external2.htm', 'Envoyer &agrave; un(e) ami(e)'); return false">Load another page's content in Window 3</a></li>
<li><a href="#" onClick="ajaxwin.show(); return false">Show Window 3</a></li>

The result is the same as in my page. The title from the page (Create / Open Window 3) isn't correct. The title from the page Load another page's content in Window 3 is correct.

Have you got an idea?


10-02-2007, 06:15 AM
I just tested the above in both Firefox and IE7. The title appears correct to me actually, which is:

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

p.s: Again, please format any code in your post using the CODE tag. This makes it a lot easier to read it. It's the button that looks like "#" in the editor.

10-02-2007, 09:25 AM
Sorry, I don't understand : what title appears to you ? The correct title is : Envoyer un(e) ami(e)


10-02-2007, 10:07 AM
Well, this is what you're inputing into the function call:

<li><a href="#" onClick="ajaxwin.load('ajax', 'windowfiles/external2.htm', 'Envoyer &agrave; un(e) ami(e)'); return false">Load another page's content in Window 3</a></li>

And this is exactly what I'm getting back as the title of the DHTML window:

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

10-02-2007, 10:43 AM
Yes, but I'm trying to display : Envoyer un(e) ami(e).
And If I write the title like this "Envoyer un(e) ami(e)", the title isn't correct because of the accent : the result is Envoyer a square un(e) ami(e).

So I used the special characters in html : = &agrave;.

And the title in the first dtml window displays : Envoyer &agrave; un(e) ami(e)
BUT the title in the second dhtml window (when you use load) displays : Envoyer un(e) ami(e) (the title correct in html).


10-03-2007, 12:04 AM
I must admit character encodings confuse me. However, I have no problem getting:

"Envoyer un(e) ami(e)"

to show up as any of the DHTML window titles just by copying and pasting the above directly when editing the script using EditPad. What text editor are you using? A decent one like Editpad (http://www.download.com/EditPad-Lite/3000-2351_4-10729503.html?tag=lst-0-1) seems to preserve the accents exactly when you open the script using it and copying and pasting the desired text into the HTML.