I am currently working on a website and I want to create a modal popup window in JavaScript. The problem is, I want to pull the contents of the window from a separate .html file and not from a hidden div on the page (this is how most of the examples I have seen show you how to do it).
I would really appreciate if someone could point me in the right direction on how to implement this.
Thanks in advance
Matt D
If using jQuery (which you should)
NB: this example uses jQuery 1.5’s new “deferred” syntax. If using an earlier function pass the handler as a parameter to
$.getas appropriate.