PDA

View Full Version : Splash Page close issue



chris98
05-26-2014, 12:47 PM
When attempting to close the splash page using javascript:splashpage.closeit(), I have placed this on the actual splash page rather than in the javascript file - it's not working, how can I get it to work in the normal splash page URL?

ddadmin
05-27-2014, 12:58 AM
Warning: Please include a link to the DD script in question in your post, in this case: http://www.dynamicdrive.com/dynamicindex3/dynamicsplash.htm . See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

To your question, is the document shown inside the splash page on the same domain as the parent page containing the splash script? If not then unfortunately you can't embed a button inside the contained document to close it, due to JavaScript's same-origin security policies. If it is, then you can modify the original close button code to the following to get it to work:


javascript:parent.splashpage.closeit()

chris98
05-27-2014, 10:03 AM
Brilliant thanks, it's working perfect now :)