Sandip's Programming Zen

An attempt to share tech/coding experiences

Choosing Iframe over other things

with 6 comments

Recently I had to design a layout for a web application in Asp.Net and I wanted to use something really flexible which gives me control over different part of the page (i.e navigation area , content area etc). I have searched and tried ajax borderlayout (extjs), <div>, frames, panels (asp.net) and iframes, then I have concluded that Iframes are best in all of them.

Using Iframe is easy, it gives you more control and flexibility, you can design various parts of the page as individual pages and put them in Iframes to make it look like a complete layout. It is also easy to pass URL variable from one frame to another using javascript.

And I have also come to know that gmail is also using iframes in their page layout. so I think I have made a right choice.

Advertisements

Written by Sandip

March 5, 2008 at 5:47 pm

Posted in Programming

Tagged with ,

6 Responses

Subscribe to comments with RSS.

  1. i struggled with the idea of using iframes because I was of the understanding that it posed “cross-browser” issues. Have you come across any compatibility issues using iframes?

    inknform

    March 5, 2008 at 8:04 pm

  2. We are targeting IE 5+ , FF 1+, Opera 7+ browsers and so far not found any issues.
    Of course the older browsers do not support iframes but it largely depends on your target users if they are still using those old browser versions then iframes not recommended.

    Look at Gmail, if they detect your browser is not one of the modern ones then they will redirect you to “basic html” version.

    But unless you are not developing an application targeting very vast user base (like gmail) then you need to make a choice which gives you more control.

    Sandip

    March 6, 2008 at 5:39 am

  3. does CSS & iFrame play well together?

    inknform

    March 6, 2008 at 2:11 pm

  4. Yes it does. if you google around you will find lots of material.

    Sandip

    March 6, 2008 at 4:35 pm

  5. Hi,

    its possible a iframe load a Ext libraries from parent ?

    example:

    parent:

    var myPanel = Ext.Panel({title:”MyTitle”,renderTo:myFrameChild.MyDivId});

    Daniel

    March 12, 2008 at 12:21 pm

  6. Well it should be possible but never tried it.

    Ext is a great JS library but I had bad experiences when I had used along with iframes and Asp.net ajax extensions (updatepanel etc). It gave me some unpredictable results and at the end instead of putting my time fixing that I have decided not to use Ext.

    Ok, that can be special, but honestly Ext is not an easy library to deal with.

    Sandip

    March 15, 2008 at 6:33 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: