Question:

acer aspire one . When i cut it on it just has a blank white or gray screen and it will n

by Guest299  |  12 years, 9 month(s) ago

0 LIKES UnLike

acer aspire one . When i cut it on it just has a blank white or gray screen and it will n

 Tags: Acer, aspire, Blank, cut, Gray, screen, white

   Report

1 ANSWERS

  1. Guest5891
    Unless your external content is served from the same domain as your main web site, using AJAX for something like this is not that easy, because you'd bump into the same origin policy.

    One solution to work around the same origin policy would be to set up a simple reverse proxy on the server, which will allow the browser to use relative paths for the AJAX requests, while the server would be acting as a proxy to any remote location.

    If using mod_proxy in Apache, the fundamental configuration directive to set up a reverse proxy is the ProxyPass. It is typically used as follows:

    ProxyPass /external/ http://other-domain.com/





    In this case, the browser would be able to request /external/index.html as a relative URL, but the server would serve this by acting as a proxy to http://other-domain.com/index.html.



    Then in your JavaScript, you would be able to use the jQuery load() method as follows:

    $('#your_div').load('external/index.html');



    Another option is to use an iframe, and adjust its height dynamically with JavaScript. You may want to check the following Stack Overflow posts for further reading on this topic:

        * Resize iframe height according to content height in it
        * Dynamically Resizing an Iframe

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 13 years, 8 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.