views:

302

answers:

5
A: 

it looks like your website is not static, so i don't see why you're doing it with bare HTML.

I'd use ASP.NET and CustomUserControl as each of your tabs, that they all the tab would be truly independent and you can reuse them anywhere in your application

roman m
+1  A: 

If I were you, I would use jQuery UI Tabs instead of my own solution.

eKek0
I will be using jQuery UI tabs but will they allow me to load any page using ajax, I created a page with two jquery tabs and than in each tab inserted same page, it did not show me the tabs inside those tabsi think somehow such loaded page are not really loaded like iframes?
Anurag Uniyal
I'm in the site now since wednesday, so I'm sorry for not answering you.Well, no, tab content loaded with ajax is not loaded into iframes, it is loaded into divs instead. I think you really don't want to load into iframes, some reasons were exposed in Calvin post.
eKek0
A: 

For the separate pages in each tab, you can as well use server includes.

Dmitris
A: 

To answer your first 2 questions:

  1. iframe is supported across all the latest web browsers however i am not sure about mobile browsers. Opera mobile yes, dont now about iPhone.

  2. the next major iteration of html is being led by WHATWG and the iFrame will be supported. It is also supported in xhtml

As far as different approaches, that very much depends on what you are going to be doing with the tabs. if each tab is going to have a lot of information on it or take a while to load then separate iFrames is probably best. Also, if you are going to reuse the code as independent pages else where then iFrames are also a good option.

Toby Mills
+2  A: 
  1. Yes, all major desktop browsers support iframes. So do many mobile browsers, including IEMobile, Opera Mobile, and Safari on the iPhone. The only major browser I know of that doesn't support iframes is the BlackBerry Browser.

  2. The object tag is supported by most browsers, but the implementation is extremely inconsistent across the various browsers.

  3. What's wrong with just having a flat page with an ordinary navigation menu? If you are only displaying one page at a time, and the only interface element being placed outside of the iframe is a tab menu, then why not just integrate the tabs into the page layout and do away with the frames?

    Frames of any sort tend to break the familiar browser behaviors that people are used--like the forward and back navigation buttons. And they completely disable the use of bookmarks. When building a website, you should try not to restrict or dictate to visitors how they're allowed to browse your site. If the user wants to open a link a new tab, they should not be left without a navigation menu. If they make their browser window a particular size, the page content should fill that area, not a predetermined area specified by the dimensions of the iframe.

    Frames are inherently user-unfriendly, which, unsurprisingly, makes them search-engine-unfriendly; which is why so few professional websites use frames/iframes. Cheap broadband is widespread enough these days that reloading a few extra kilobytes of navigational data makes no difference to the overall user experience.

Calvin
i agree buta) having navigational items in each page would not be ajaxian i.e. open tab without page reloadb) as i said i may want to have each page to be seprate , so tosome users i can club few pages for some more, obviously that can be part of navigational item logic but that things get complex
Anurag Uniyal
I've developed quite a few web applications w/ AJAX interfaces, and I've never needed to use iframes. Loading/reloading a page in an iframe is not really AJAX. With AJAX you should be able to update the interface of an already loaded document without loading a new page.
Calvin
Depending on the content you are displaying, you can just use actual AJAX (XmlHttpRequest) to pull data from the server, process it client-side with JavaScript, and display it insides of a Div element or a dynamically created interface.
Calvin
yes i understand what you mean, but basically what I want isload a complex page in tab, now how that will be accomplished with iframes and using navigational items?
Anurag Uniyal
and my complex page inside tab can have further tabs, I know it can be accomplished with javascript/ajax but easier solution looks iframes
Anurag Uniyal
You may be right, and it probably is easier in this instance. But I would encourage you to look into the AJAX features of frameworks like jQuery or YUI for future projects. It's not as hard as you might think, and it can be quite useful for building complex interfaces.
Calvin
Thanks a lot for answers and i have accepted your answer, but I am still not sure, actually i think it is not possible to have seprate URL for each tab(that is why i will not use iframes) and not reload the page on each clickCan you describe a implementation where each tab is restful(have URL) and we do not reload page?other wise if we load page via ajax on tab click and URL doesn't change, in that case i do not see why iframe is not better?
Anurag Uniyal