Results 1 to 11 of 11

Thread: Tab Control

  1. #1
    bmartling
    Guest

    Tab Control

    How do I get a tab control to work in html, dhtml, or asp? Either active-x tab control or other. I'm using Interdev 6.0, not that it matters.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Tab Control

    I'm not completely clear on what you need. If you want to emulate a tabbed dialog without reloading the page, I hope there is some kind of control or plug-in because I think it is quite a bit of work to do that in JavaScript. If you are wiling to make a trip to the server, I think it's really a question of deciding how to submit a form from an image map of a tab strip so that values in the form can be preserved. (Not that I know how to do that, but it seems that's what you would want to do.) Have you seen anything similar to what you want on the web that you could point us to?

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control

    *Edited by KT to include hyperlink*
    Tab controls are not supported by HTML. You would have to accomplish it either with active-x (in which case it would only work with IE) or Java (not JavaScript) which would work in any Java enabled enviornment. Search <A target="_blank" HREF=http://www.gamelan.com>http://www.gamelan.com</A> for a java bean that helps you accomplish this.

  4. #4
    bmartling
    Guest

    Re: Tab Control

    I'm only concerned with IE, and active-x would be fine. How do you get it to work? I don't want to use Java if I can help it.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control

    Bob,

    What do you want to achieve?

    The simplest solution would be to do it the way most "tab" controls on the web work- create images which look like tabs, and create hyperlinks on each tab.

    If the response is too slow, you could use Javascript to achieve something faster.

    ActiveX controls have to be distributed, and that can cause problems. If it's for an Intraweb, get the LAN people to distribute it for you. The can be downloaded- but the user has to answer something like "You are about to download a potentially unsafe ...". (Or you may be able to have a digitally sined control- I've not gone that way).

    That having been said, and ActveX control can be a lot more powerful than any other solution.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control

    Sorry, can't help with VB/ActiveX programming.

  7. #7
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control

    Jefferson,

    It might not be too much problem is Javascript.

    As long as the users all use IE, and allow Jscript, the following is a very crude way you could switch pages:<pre><HTML>
    <HEAD>
    <SCRIPT>
    function show(n) {
    Option1.style.visibility = "hidden"
    Option2.style.visibility = "hidden"
    eval("Option" + n).style.visibility = "visible"
    }
    </script>
    </HEAD>
    <BODY>
    Option 1
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Tab Control

    Looks like I'm going to have to crack some books and figure out this <SPAN> and <DIV> stuff. Especially because I'm getting more interested in reading web pages in memory with VBA rather than opening them as documents in Word, and the document object model involves all these nested objects. Hmmm...

  9. #9
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control

    Jefferson,

    The <span> and <div> are nothing special. They're almost "null" tags just so that you can do something else.

    The bit which does the work in this (trivial) example is the style which is applied- which makes any tag (not just <SPAN>. The "magic" is in the styles- "style=visibility:hidden". But be careful of using styles. They're marvellously useful, but there might be cross-browser issues.

    The javascript in the examlple just changes the style of one container tag to visible, and the other to hidden.

    The same without SPAN:<pre><HTML>
    <HEAD>
    <SCRIPT>
    function show(n) {
    Option1.style.visibility = "hidden"
    Option2.style.visibility = "hidden"
    eval("Option" + n).style.visibility = "visible"
    }
    </script>
    </HEAD>
    <BODY>
    <table border=1>
    <tr><td>
    Option 1
    </td><td>
    Option 2
    </td></tr>
    </table>



    <table>
    <tr>
    <td id="Option1" style="visibility:visible;position:absolute;left:0 ">
    This is Page 1 stuff
    </td></tr>
    <tr>
    <td id="Option2" style="visibility:hidden;position:absolute;left:0" >
    This one is everything you might have on page 2
    </td></tr></table>
    </BODY>
    </HTML></pre>

    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  10. #10
    bmartling
    Guest

    Re: Tab Control

    Yes, I know all that. I'm talking about getting the darn active-x tab control to work, period. I can't get it to work in Visual Interdev (6.0).

  11. #11
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Control

    Bob,

    Sorry, I didn't realise that you already have an ActiveX control.

    You will need to find the class ID of the control.

    This is an example of a different ActiveX control I have working- it's the MS Chart control<pre><SPAN id=Main style="position: absolute; top:90; left:190;z-index:-10">
    <object id=ChartSpace1 classid=CLSID:0002E500-0000-0000-C000-000000000046 style="width:400;height:330" VIEWASTEXT></object>


    <script language=vbs>
    dim c
    Sub Window_OnLoad()

    ' Clear the contents of the chart workspace. This removes
    ' any old charts that may already exist and leaves the chart workspace
    ' completely empty.
    ChartSpace1.Clear
    ChartSpace1.Charts.Add
    Set c = ChartSpace1.Constants
    ...</pre>

    You will also have to get the control registered- if it is not registered already.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •