Switch Facebook Tabs inside iframe - facebook

How to you link from inside an iframe to another tab? When i normally link from inside the iframe it provides you with a
Do you have to use javascript ? if so how would you do that?
Example (the second carousel image):
http://www.facebook.com/pages/New-York-Life-DFW/116752861740593?sk=app_208195102528120

I would use target="_top" just in case Facebook (or you) decided to wrap the whole thing inside another frame.

I believe the that you can do it by setting the target of the link to "_parent"
i.e. this would be the link inside your iframe:
Go to another tab

Related

Showing link target in not visible iframe?

I have a link, it looks like that:
link text
The target (shop) is an iframe with the name shop. Clicking the link and showing someplace.html in the iframe only works, if the page that contains the iframe is already loaded.
So my problem is, how can I make it work even if the page that contains the iframe is not loaded? I tried loading the page with the iframe by redirecting to it when the link was clicked using its onclick, that worked, but I still have to load someplace.html afterwards and this is where I am stuck.
Any ideas how to solve that? I can use jQuery or plain JavaScript ... doesnt matter.
Thanks!
If you have a link with a target "shop", you must have a iframe called "shop". It is possible to load the iframe with a blank page if there is no initial content.

Opening separate url in iframe ipad/phonegap

I want to open the url in same page where I added iframe tag. But it opens url in separate window.
you could always have a lightbox such as prettyPhoto load the iframe right ontop of your current site? Or you can try to add target="_self" to the tag. Generally that state is assumed if you don't specify otherwise. To see how a pretty photo loads an iFrame you can go here:
http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/#!prettyPhoto[iframes]/0/
Hope this helps.

How did Facebook implement the chat sidebar?

I'm trying to understand how Facebook implements the chat sidebar. It seems to stay there even as I change pages. For example, if I select some text inside the sidebar, then click to go to another Facebook page, the text remains selected. It's as if it was a separate frame, but when I look at the code, it's not.
All requests are made trough AJAX calls. Only "content" container is replaced when needed.
You don't actually "go" to another page. Just the "content" div gets updated.
There is a container DOM element called "fb_content", its content is replaced through straight-forward AJAX or more technically XMLHttpRequest. (Although when for example you enter an app, the entire page is refreshed.) To update the address bar they use the JavaScript History API.
In addition to what Zeno and lericson said (fb_content gets updated via ajax), the address bar also gets updated while maintaining the history (if you press back/forward).

facebook-app: share-button and iFrame resize code together

Is it possible to have a share button (the old one) and the iFrame resize function in the same app? It seems the two javascript libraries don't work together.
Update
I finally replaced the old share button with a FB.ui feed dialog:
https://developers.facebook.com/docs/reference/dialogs/feed/
you could nest the share button in a separate iframe, so the library won't need to work together

Resize iFrame in facebook fan page

I want resize the iframe height of my tab page. I am trying FB.Canvas.SetSize method, also I try with jQuery and javascript resize the iframe but donĀ“t work.
My application is not a Canvas.It is a tab page so i think "FB.Canvas method should not work with tab page".
How could resize my tab page on facebook profile?
How could drop the iFrame scrollbars on tab page?
Excuse me I also need to know if I could modify the share button with a custom image.
Thanks in advance
Provide some code
Make sure you have the Canvas Height option is set to Settable under the App Advanced Settings
Use asynchronous Loading of your JS-SDK and put your FB.Canvas.setSize(); inside the fbAsyncInit function
Please note that the fbAsyncInit function may fire (and hence your FB.Canvas.setSize();) before all images of your page are loaded! which means actual height of page is not reached yet!