iframe scrolling in html5?

I want to include a page from another website in a page on my site.  But, the page that I want to include will probably not be the same size (or even fit completely in) the iframe container that I wanted to use (especially if the web page containing the iframe has been resized to be even smaller).

I am new to web coding, but I have seen that there may be an issue with scrolling in an iframe when using HTML5.  I have seen sites saying that this s broken, but nothing that gives coded examples of howto work around the issue.

If the page that I want to embed is larger than the area of the iframe, what is the best way to embed the other site's webpage in my page using HTML5 and CSS3 (jQuery and PHP 5 will also be used - just in case that makes any difference).

I do have access to the site code for the site page that I will be embedding.  Should I just code the originating page to read the size of its container and refresh accordingly?  If so, do you have any code samples of how this is done?
JimHubbardAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

COBOLdinosaurCommented:
cross browser scripting will always fail because it is a security violation.  Sroling the iframe on your page should not be a problem, but without seeing the HTML it is impossible to know if you have an error that is preventing it.

Cd&
0
Amar BardoliwalaCommented:
Hello JimHubbard,

See if following helps

http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content

Thank you.

Amar Bardolwala
0
JimHubbardAuthor Commented:
I have been informed that they (the site owners) would like for me to find a solution that does not include altering the primary site from which the catalog is coming.

Is there a way to do this without altering the main site by screen scraping or something?

The main site is an ecommerce site with a catalog and a search function that users can search the catalog for items containing the search terms.  The owners want to display the catalog (with search) on the new site, in an iframe that will resize with the page it is embedded in.

To make the task completely impossible, the two sites are on different servers located in different locations (one is their primary warehouse and the second is a specialty warehouse in another state) - so there goes just linking to the server locally.

And, no...they have not exposed an API from the main site.

Is this even possible?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

COBOLdinosaurCommented:
A web cannot interact with a page from another domain. Screen scraping may let you display the contents but you will not have the functionality. your problem can be summed up in one word SECURITY browsers and operating systems have restriction that are absolute when it comes to cross-domain access.

AFAIK there is no workaround... hackers would be on it in a second.  Before the restrictions were added cross-domain exploits were the most common method of delivering virus code, trojans, and server crushing bombs.  I don't think you are going to be able to please your bosses.  

Your best hope is to transfer the pages with a server to server HTTP request that then allows you to server the pages from the local server, but any thing embedded like js file could still be an issue.


Cd&

Cd&
0
JimHubbardAuthor Commented:
I don't think this is going to work - at least not the way they want it done.

Although I am a beginner at web coding, the problem here is that the owner's don't even know s much as me about web coding and are tying my hands by not allowing changes to the main site (like adding a page formatted for inclusion in iframes) or exposing an API.

I think I could show items from the catalog in an iframe by doing some screen scraping on the server - but I'd have to keep a window open to the server to pass through clicks and search info to an actual page and scrape, format and forward the results to the iframe.

Even if I could do the server/scrape thing, the amount of time involved will far exceed the amount of time that it should take to do it right (with an API or iframe formatted search page).

It may be time to tell the owners that it just cannot be done their way.
0
COBOLdinosaurCommented:
The hardest part of web development is telling the boss or client that what they want is not possible.  However you have what you need most...alternatives.  So at least you don't not have to say NO!  Instead you can say "it is only possible if...".

Cd&
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JimHubbardAuthor Commented:
Thanks for the help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.