Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8276639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:25:49+00:00 2026-06-08T08:25:49+00:00

I have created a custom list input form based on the default New.aspx template.

  • 0

I have created a custom list input form based on the default New.aspx template. I have tabs on my form, so I need some javascript to activate the selected tab. I have all of the code written, but I can’t figure out where to put the <script />. If I put it in the header areas above or below the <ZoneTemplate> tags, I get various errors and the buttons on the ribbon stop working. If I put it in between the <ZoneTemplate> tags, the form loads, but not the javascript. Any help is appreciated.

J–

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T08:25:50+00:00Added an answer on June 8, 2026 at 8:25 am

    Bascially, you want to put the code to set the active tab on the server side, not with javascript. Heres an example of a Sharepoint tabbed multiview:

    <asp:Menu ID="menu1" runat="server" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False" >
        <Items>
            <asp:MenuItem  Text="Tab 1" Value="0"></asp:MenuItem>
            <asp:MenuItem  Text="Tab 2" Value="1"></asp:MenuItem>
        </Items>
    </asp:Menu>
    
    <asp:MultiView ID="Multiview1" runat="server" ActiveViewIndex="0"  >
        <asp:View ID="view1" runat="server">
            <div>STUFF</div>
        </asp:View>
        <asp:View ID="view2" runat="server">
            <div>STUFF</div>
        </asp:View>
    </asp:MultiView>
    

    You then need to write a function server side to handle the tab clicks:

    Private Sub menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles menu1.MenuItemClick
        Try
            If Multiview1.ActiveViewIndex <> Int32.Parse(e.Item.Value) Then
                Select Case Multiview1.ActiveViewIndex
                    Case PageView.Tab1
                        Multiview1.ActiveViewIndex = Int32.Parse(e.Item.Value)
                    Case PageView.Tab2
                        Multiview1.ActiveViewIndex = Int32.Parse(e.Item.Value)
                End Select
            End If
            ActiveView(e.Item.Value)
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    

    And a function to handle the Active View switching:

    Public Sub ActiveView(ByVal value As Integer)
        Try
             Multiview1.ActiveViewIndex = value
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    

    This is all written in VB. so if you have any questions, I’d be happy to answer. I hope this gets you on the right track. For clarity, I haven’t added anything related to page validation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a custom list as a feature in sharepoint. i need to
I have created a Custom Edit Form for a custom list using SharePoint designer.
I have created a custom list view, each row has it's own custom selector,
I have created a custom control (based on a panel) in wxPython that provides
I have created an application that contains a list field(custom) If a certain condition
I have created a list using Custom List in Data Sheet View . After
I have created a custom list in SharePoint 2010 programmatically. It works fine on
I have created a custom ImageView and in its onDraw method I need to
I have created a custom User profile template and object in the core database
I've created a custom list, and made some changes to the way the CQWP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.