Results 1 to 8 of 8

Thread: DHTML Window widget (v1.03)

  1. #1
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML Window widget (v1.03)

    1) Script Title: DHTML Window widget (v1.03)

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex8/dhtmlwindow/

    3) Describe problem: I have successfully installed the above widget but I get a javascript error. The window loads but no content is displayed. I have the window set to iframe and the javascript error is window.frames[...].location is null or not an object.

    Any ideas ?

    EDIT: To make things even more odd the script on my page WORKS in Firefox 2 but not in Internet Explorer 7 !!!
    Last edited by mwh65; 10-05-2007 at 10:10 PM.

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

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.

  3. #3
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No problem ...

    http://www.agls.org.uk/forum/activity.php

    Click on one of the game links to open the DHTML window eg Drop Blocks. Please note this will also open a standard window which will be in front of the DHTML one.

    You will need to login with the following temporary account details ...

    username : scrapper
    password : tester
    Last edited by mwh65; 10-06-2007 at 10:54 AM.

  4. #4
    Join Date
    Oct 2007
    Location
    Statline, Nevada usa
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You need to add return false to your onclick handler for the dhtml window link not to be followed unless javascript is off in the user's browser.
    Something like...
    onclick="blur(); return false "

    As for the content, it does appear in Firefox, just fyi.

    I did notice that in your header the script tag is not closed, as well as you seem to be missing the copyright notice for dhtmlwindow

    As far as closing tags, I notice you are using the <script .... /> convention. There is a known IE issue with this. (search google for "closing script tag" and you will find pages such as this one describing the issue.

    Anyway, you might try changing the code to something like:
    Code:
    <script language="JavaScript" type="text/javascript" src="./popup/dhtmlwindow.js">
    <!--
    /***********************************************
    * DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
    * This notice must stay intact for legal use.
    * Visit http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    //-->
    </script>
    Older convention, most proper. And don't forget to give credit where its due ;^)
    Last edited by twohawks; 10-07-2007 at 12:53 AM.

  5. #5
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well unfortunately nothing you suggested worked

    In fact amending the onlick event to onclick="blur(); return false" stopped the javascript function from running altogether !!! Just to check, it didn't work in FireFox 2 either.

    Obviously I have had to remove the return false from the onclick event as the site is live but have left your other suggestion in regarding the closing tag etc.

    Obviously the script runs so far but the content of the window generates the

    window.frames[...].location is null or not an object

    error.

  6. #6
    Join Date
    Oct 2007
    Location
    Statline, Nevada usa
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmmm... did you see this thread, maybe it will help...
    Need help opening DHTML Window widget into other frame

  7. #7
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The link I provided was a direct link to the page without frames.

    http://www.agls.org.uk/forum/activity.php

    ddadmin can you think of anything here that I haven't thought of ?

    If push comes to shove I will have to remove the script and find another but it will be a shame.

  8. #8
    Join Date
    Oct 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well after pulling apart the Games page script I have found the problem

    It was the Menu script across the top. I created this drop-down menu in WebStyle 4. I've removed the menu so everyone can see the DHTML Window working.

    As for why it doesn't work with the menu loaded is another matter but I will cross that bridge later.

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
  •