locked
Recreating Form Tabs RRS feed

  • Question

  • This might be a bit adventurous but here it goes.

    We have a few entities that are Money related (net worth, insurance, holdings, etc) to a contact (1:N) and currently we have separate links in the nav bar of the contact for the associated views. This is alright, but we'd like to have one link in the nav bar, then have each of those sections as a tab... as far as I can tell I have to mimic creating the tabs. 

    As far as I can tell I've got the basics; it displays like the tabbed form, but whenever I change tabs it gives a javascript error:

    Line: 13
    Error: 'crmForm' is undefined

    <html>
    <head>
    <title>Money Information</title>
    <link rel="stylesheet" type="text/css" href="styles/dialog.css" />
    <link rel="stylesheet" type="text/css" href="/_nav/nav.css.aspx" />
    <link rel="stylesheet" type="text/css" href="/_nav/tabs.css.aspx" />
    <link rel="stylesheet" type="text/css" href="/_static/_forms/controls/form.css.aspx" />
    </head>
    <body>
      <table class="ms-crm-Form-Area" cellspacing="0" cellpadding="0">
        <tbody>
          <tr>
            <td>
              <table style="width:100%; height:100%;" cellspacing="0" cellpadding="0">
                <form name="crmForm" class="ms-crm-Form" setinitialfocus="true">
                  <tbody>
                    <tr>
                      <td class="ms-crm-TabBar-Cell">
                        <ul class="ms-crm-TabBar" id="crmTabBar" style="width: 255px;" onafterchange="crmForm.SetTabFocus()" valign="bottom" nowrap="">
                          <li tabIndex="-1" class="ms-crm-Tab" id="tab0Tab" tabID="tab0">
                            <a>Summary</a>
                          </li>
                          <li tabIndex="-1" class="ms-crm-Tab" id="tab1Tab" tabID="tab1">
                            <a>Holdings</a>
                          </li>
                          <li tabIndex="-1" class="ms-crm-Tab" id="tab2Tab" tabID="tab2">
                            <a>Net Worth</a>
                          </li>
                        </ul>
                      </td>
                    </tr>
                    <tr height="100%">
                      <td valign="top">
                        <div class="ms-crm-Tab" id="tab0">
                        </div>
                        <div class="ms-crm-Tab" id="tab1">
                        </div>
                        <div class="ms-crm-Tab" id="tab2">
                        </div>
                      </td>
                    </tr>
                  </tbody>
                </form>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
    </body>
    </html>


    Am I going about this right, or should I be looking for another solution?
    Thursday, February 4, 2010 5:52 PM

Answers

  • Have you seen following line of code:

    <
    ul
     class
    =
    "ms-crm-TabBar"
     id
    =
    "crmTabBar"
     style
    =
    "width: 255px;"
     onafterchange
    =
    "crmForm.SetTabFocus()"
     valign
    =
    "bottom" nowrap=""
    
    there is handler which invokes method of crmForm and you don't have such object in your form and method.

    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Thursday, February 4, 2010 6:20 PM
    Moderator

All replies

  • Have you seen following line of code:

    <
    ul
     class
    =
    "ms-crm-TabBar"
     id
    =
    "crmTabBar"
     style
    =
    "width: 255px;"
     onafterchange
    =
    "crmForm.SetTabFocus()"
     valign
    =
    "bottom" nowrap=""
    
    there is handler which invokes method of crmForm and you don't have such object in your form and method.

    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Thursday, February 4, 2010 6:20 PM
    Moderator
  • Good call... Apparently its just one of those days!

    Thanks Andriy
    Thursday, February 4, 2010 6:22 PM