Results 1 to 6 of 6

Thread: DHTML Window Widget Problem with Title Next

  1. #1
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window Widget Problem with Title Next

    1) Script Title:
    DHTML Window Widget
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/index.htm
    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
    }
    openmypage();
    </script>
    <ul>
    <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>
    </ul>

    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?

    Thanks
    Regards

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

  3. #3
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, I don't understand : what title appears to you ? The correct title is : Envoyer à un(e) ami(e)

    Thanks
    Regards

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well, this is what you're inputing into the function call:

    Code:
    <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:

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

  5. #5
    Join Date
    Sep 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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).

    Thanks
    Regards

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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 seems to preserve the accents exactly when you open the script using it and copying and pasting the desired text into the HTML.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •