Jump to content

No Response Headers


chasethemetal
 Share

Recommended Posts

Hey all. I'm trying to the load the contents of a page into another page via this method. $(document).ready(function(){$("#page").load('http://www.site.com/site.php');}); <div id="page"></div> And I've noticed I'm getting no Response Headers. Also Safari says "cancelled opening page" in the bottom. Any thoughts... Nothing load,and the page is on the same site.

  • Like 1
Link to comment
Share on other sites

I got it to work... but not all the way... Basically the path needed to be ('folder/folder/page.php') I took out the whole http://www.mysite.com/.... But now I noticed the JavaScript in the page.php is not being executed.... It loads all html and css, but no client side scripts... I am trying to include pages on a page using jquery instead of targeting iframes.

Link to comment
Share on other sites

It's always a problem trying to execute Javascript from pages loaded with AJAX, because there are dependencies and redundancies involved. I think you should use a server-side language to include page content instead of Javascript. Because if a user has Javascript disabled, they won't be able to get to other pages of your site. Also, when you're including the content of a whole page, you're adding useless <html>, <head> and <body> tags, it's a big mess.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...