SharePoint provides a JavaScript array “_spBodyOnLoadFunctionNames”, any function to be executed onLoad needs to be added to this array e.g. _spBodyOnLoadFunctionNames.push("ExecuteMyFunctionOnLoad"); Now, why does your JavaScript function doesn’t execute if you just register it with ClientScript.RegisterStartupScript? Actually, content pages can’t execute JavaScript function on body load, reason; content pages can’t directly add a function to the body’s OnLoad event if master page contains the <body> element (which is mostly true). This array is basically a part of init.js located in “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\”. If you open the javascript file, you will notice the page onLoad event is handled by function _spBodyOnLoadWrapper, which further calls ProcessDefaultOnLoad, and this function executes all the function names added in array "_spBodyOnLoadFunctionNames". function addLoadEvent ( func ) ...
MOSS 2007 sites can display drop down menus in the tabbed navigation across the top. Unfortunately there is not an easy check box to act ivate this functionality; instead things just have to be set up the right way. If you want your MOSS site to show drop down menus, make sure the following is true or walk through the following steps: 1. From the root of the parent site (Home) choose to create a new site (Site 1). Once that site is created, you will be in that new site. From here choose to create a new page. 2. Once that is created,choose to create another new site (SubSite 1). Then create a new page in SubSite1 3. Your site structure should resemble like this (Pic Shown below)
4. For each site in the Navigation settings, both Show Subsites and Show Pages should be checked. a. Select Site Actions - Site Settings - Modify Navigation. b. Check Show subsites and Show pages in the first row. 5. The end resul...
The Contact Selector consists of 3 data nodes: DisplayName AccountId AccountType Each is just a text field. When you publish your form, you have the option of promoting one or all of the fields. DisplayName only contains the PreferredName attribute of the User Profile Database, which is typically in the form of LastName, FirstName, but it depends on your AD setup. AccountId is the most valuable field, because it contains the user's domain name in the form of domain\username (i.e. microsoft\userId). If you promote this field to SharePoint, then this value is immediately usable for sending workflow emails in SharePoint Designer. I do this all the time. Also, that value can have the domain portion stripped out and be used to query the GetUserProfileByName web method to retrieve the selected user's profile info, including Email Address, Manager, Department, and many other attributes stored in the profile database. Since these are text fields, th...
Comments
Post a Comment