PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sun Sep 24, 2017 7:19 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Thu Nov 24, 2016 5:33 pm 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4335
Location: United Kingdom
We are developing some work so that the client can take the iframe code, and pop it into a page, so the page loads embedded. However, we don't want there to be any scrolling. It needs to look like it is part of the page. So that whatever is in the page, expands the iframe.

The main issue is, we have no control over the "outside" of the iframe, as the system it's going in doesn't allow additional <script>.
We cannot set a height to the iframe, because if it's wrong, then there will either be a huge gap at the bottom, or still a scroll.

Can it be done??

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Tue Nov 29, 2016 3:43 am 
Offline
Forum Contributor

Joined: Fri Jul 20, 2007 11:29 am
Posts: 332
I think the only way would be for the page consuming the iframe to have script on it that can receive info from your page within the iframe. There's also some new html5 features ( I don't know how well supported ) planned that are supposed to make the page within an iframe automatically blend seamlessly with the host page. That requires some new attributes on the <iframe> tag itself so again it's up to the owner of the host page to include those attributes (if they are even supported yet).

You could give it a default height have some JS based scrolling that looks nicer than the default scroll bar. But again the owner of the host page can choose to remove your height and no-scrolling attributes.

But if the owner of the page using the iframe cares about it looking nice it only take a tiny bit of js to make it happen: http://stackoverflow.com/questions/9975 ... hout-using

_________________
Warning: I have no idea what I'm talking about.


Top
 Profile  
 
PostPosted: Tue Nov 29, 2016 3:53 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4335
Location: United Kingdom
What if you cannot add code to the host page? Only embed the iframe.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Tue Nov 29, 2016 7:59 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6348
Location: Montreal, Canada
Then there's not much you can do and, I would argue, it's not even your problem.

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Tue Nov 29, 2016 8:45 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4335
Location: United Kingdom
We want to, so we can add iframe code to ebay, and have it expand to fit the content. Sounds like this isn't possible.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Fri Dec 02, 2016 7:30 pm 
Offline
Forum Contributor

Joined: Fri Jul 20, 2007 11:29 am
Posts: 332
simonmlewis wrote:
We want to, so we can add iframe code to ebay, and have it expand to fit the content. Sounds like this isn't possible.


A simple e-mail to someone in support or developer outreach at e-bay asking "Will you allow us to do this thing with iframes?" would have gotten you a quick yes or no or suggestion of things they would allow you to do that you might not have thought of yet.

_________________
Warning: I have no idea what I'm talking about.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group