Last post for today as I've been working on this implementation and want to get something ready for testing.
In this case, I have a solution I use and want to make sure it is valid.
Like others have mentioned there is often the case of dynamic size ads so if I have a 300x250 safe iframe, I may get a 300x600 ad that isn't planning on expanding and thus doesn't have any code to make the iframe bigger.
My code can detect the size of the ad returned so I just do this and then initiatie my own expand command from the ad back to the page and this seems to work.
Is this implementation valid?
Princ S/W Eng
Agree'd. In Yahoo! we have some custom wrappers that handle this by basically knowing up front that the ad could be 1 of 5 sizes.
Basically in v.next there will likely be a resizeTo/resizeBy set of methods to solve this for you. . but for now this is really the only option, unless you implement some from of custom code inside the SafeFrame to do auto-detection and custom messages.
Keep in mind though that if you do this, the ad in question cannot expand again, until you first call collapse.
That last line is very interesting. So if I do an expand, the next expand is rejected? That could be a show-stopper until the resizeTo/By exists in which case,I guess we can call that and then call expand.
We have spots that can serve 300x250, 300x600, 300x1050 and all can expand and we don't know ahead of time what serves.
Thanks again for the quick responses.
Yep that's right. It's a one to one state. It's shouldn't be too much of a show stopper though. You do your auto-expansion. Then if you want to re-grow (to do a real expansion say when a user clicks), you just collapse it 1st, and re-open, and repeat.
But yes I know that's a pain. . .I swear I'm working on the resize stuff :P
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.