DHTMLmodal window won't close
1) DHTML Modal window v1.1
3) I am using this script on
on this home page its working.
I then set up a page
with the code to allow others to use the interactive map. When this code is pasted into another page - SEE
- this works BUT for some reason the pop up window (the map) won't close when the X is clicked - seems to reload? I get an error msg (in IE) error modal.js line 55 char 2 - which is the close function.
NB the dhtmlwindow.js was renamed dhtmlwindow1.js when I edited the urls to the graphics files to full urls thats the only difference
Can't see what the problem is any help appreciated.
Last edited by marcusbmig; 02-12-2012 at 07:18 PM.
This is due to the page you're trying to open inside the modal window being from a different domain than the page opening it. By default the script tries to access the document object of the former, which in this case throws an error.
Try the below modified modal.js file, which silently suppresses this error in such an event.
The Following User Says Thank You to ddadmin For This Useful Post: