Link to home
Start Free TrialLog in
Avatar of webgirl29
webgirl29Flag for United States of America

asked on

Jquery Tools - Overlay - Load External Page

Hello.  I downloaded the Demo from JQuery Tools here http://jquerytools.org/demos/overlay/external.html and I'm having trouble. Basically, I went back to the very beginning with the code I downloaded and cannot figure out why it DOES load an external page in the Demo on the site, but DOES NOT when I download the demo to my personal workspace.  I've attached the demo here.  

Made a modification to the overlay color, but that's it.  Can you help me figure out how to get the external pages to load in the <div> container?  See ZIP file attached. jquery-overlay.zip
ASKER CERTIFIED SOLUTION
Avatar of Steve Krile
Steve Krile
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of webgirl29

ASKER

Thanks. Once I placed all my files on the same testing server it worked. Question though... are we able to pull in an external page that's not on the same server? Like when I try to use http://www.google.com, it does not work.  Seems to only work when you pull in external content from the same server.  Is that true?  Or is it because it's part of the same domain name?
XMLHttpRequest will be blocked when the page you are referencing is ON A DIFFERENT SERVER.  So, mysite.com cannot use $.load("http://google.com")


It really depends on your intent, but ultimately this is a HUGE security hole if it were allowed.  People do iFrames to show redirected content, or use JSONP services which ARE allowed to come from external domains to feed data rather than a "page".
Ok, understood.  Thank you for the quick response. So as long as it's on the same server, I should be fine. If I was pulling content from a different "sister" company website that's on the same server (different domain though), you're saying that will work as well?  Just curious.
Good question re: Domain versus Server.  I am actually not sure, but it would be easy to test.  My guess is it WILL NOT work.
Ok, not a problem.  I may test that out, but not a requirement for me at this time.  Was just curious.  Thank you for your assistance and feedback.  Much appreciated!