JScript error in Window script block for SharePoint web part

I am getting a runtime JScript error while trying to execute my web part. I assume that this error may be occuring because I am trying to assign a Javascript function to a SPMenuField.NavigateUrlFormat property.
I have tried modifying the AllowedProtocols value in one the array variables for the SPUrlUtility.AllowedProtocols using the instructions at
http://tipssharepoint.blogspot.in/2010/06/using-javascript-in-navigateurlformat.html. Even that didnt work.
Could someone please help me on this?
Thanks Sandy

Hi ChaitanyaSandeep,
The list of allowed protocols in AllowProtocols property doesn’t contain javascript, the following article shows an example to replace one of the values of the AllowedProtocols array before rendering the control, you can consider checking
whether this works:
http://blog.sdbonline.com/2009/04/using-javascript-in-the-navigateurlformat-property-of-the-spmenufield.html
Thanks,
Qiao Wei
TechNet Community Support

Similar Messages

  • Dundas Gauge for SharePoint web part

    Hi,
    I'm using the Dundas Gauge for SharePoint web part, it seems that I have to add a seperate web part for each and every guage that I want added to the page, this means that inside each web part I have to add the connection string details for the sql database to get the data for the guage.
    If I have 20 guages on a sharepoint page, this means 20 connection strings, 20 hits on the db - it's not sounding good.
    Has anyone had any experience of this or has any thoughts on the best way to integrate this?
    Best Regards
    Kieran

    As long as the connection strings are the same connection pooling will probably be used (they could disable it if they wanted to but not very likely).
    It could still be 20 seperate hits to the database though. If each gauge is looking at a seperate dataset then absolutely it would require a trip to make the query.
    You should investigate if the controls support caching directly (very likely) and create a good caching strategy if you need 20 seperate query results on one page.

  • Errors while editing the xsl for dataview web part

    while modifying a dataview webpart in sharepoint designer, i finding the issues for the below line
    <xsl:for-each select="$Rows[substring-before(substring-after(substring-after(@FullName, '?ID='), '>'), '<') = $FullName]">
    errors:
    the tag is marked invalid because it is missing quote for  '>' and '<'
    the tag is marked invalid because it has an extra quote ">

    Hi ,
    According to your description, my understanding is that you got an error when you edited the xsl for dataview web part.
    Please try to change
    <xsl:for-each select="$Rows[substring-before(substring-after(substring-after(@FullName, '?ID='), '>'), '<') = $FullName]">
    To
    <xsl:for-each select="$Rows[substring-before(substring-after(substring-after(@FullName, '?ID='), '&gt;'), '&lt;') = $FullName]">
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How do I set EchoSign for Sharepoint web part to only sync documents that have been sent from the same site?

    Since EchoSign for Sharepoint (the web part) is basically worthless with any site over 2500 documents, we have broken up our sites so that the web part can successfully traverse the site without timing out. However, within the web part, there is an option (two green arrows) to synch with SharePoint. Unfortunately, users can sync any document from EchoSign to a SharePoint library. I dont want the users synching documents that dont belong in that library. Are there any settings or coding that will allow only the syncing, or actually auto sync the documents, to within the same site?

    Hi Ben,
    Please refer the doc: https://echosign.my.salesforce.com/sfc/p/#300000006IaDOWUzLXIiAnH9NO8_F9WhM_gpxBs
    for EchoSign integration with Sharepoint.
    Regards,
    Rave

  • Error while releasing credit block for the order

    Hi all,
    I am getting follwing error while releasing credit block for the order in VKM1
    Incorrect index structure for table IVBEP1
    Text
    Incorrect index structure for table IVBEP1
    Diagnosis
    Internal error.
    Procedure
    Repeat the transaction.
    If the error occurs and you have a CRM System connected to your SAP R/3 System, the document may have been archived in the CRM System.
    If the error occurs again, inform your system administrator. If the error cannot be corrected, call the SAP Hotline directly. Describe which steps preceeded the error.
    But we are not transfering any orders to CRM.The order can be only seen in R/3
    Please assist
    Regards
    Mano

    Hi
    KIndly check the oss note 505876 in may help you
    Regards
    Damu

  • I am receiving a werfault.exe application error in windows 8.1 for design premium cs5.5

    Please help
    I am receiving a werfault.exe application error in windows 8.1 for design premium cs5.5.
    The product was previously installed on this machine and worked fine.  Today is did not load and said to re-install and I get the above error.
    Laura

    Without exact system information and the crash info nobody can tell you anything.
    Mylenium

  • WMI __SystemSecurity class GetSecurityDescriptor method reports error 0x8004101d Unexpected error on Windows 2008 R2 for WMI namespace "\root\cimv2"

    WMI __SystemSecurity class GetSecurityDescriptor method reports error 0x8004101d Unexpected error on Windows
    2008 R2 for WMI namespace "\root\cimv2"
    On Windows 2008 and Windows 2012 R2 GetSecurityDescriptor works fine.
    Thanks,
    Sandygg
    Dev

    Hi Anna,
    No event getting generated under Application / Security, but following event was reported under Microsoft-Windows-WMI-Activity/Operational
    log.
    Id = {01EAEC48-F800-0001-5A81-6ADB7E6CD001}; ClientMachine =
    sever2008r2; User
    = sever2008r2\user;
    ClientProcessId = 12580; Component = Unknown; Operation = Start IWbemServices::ExecMethod - root\cimv2 : __SystemSecurity::GetSecurityDescriptor; ResultCode = 0x8004101d; PossibleCause = Unknown
    Will let you about WMI Diagnosis tool result.
    Thanks,
    Sandy
    Dev

  • Windows script needed for the following tags

    hi ,
    I am currently automating a web task using windows script.
    For the below source script , i need wsh script
    <td title="Export Report" class="ui-pg-button ui-corner-all" style="cursor: pointer;" jQuery1404898744838="556">
         <div class="ui-pg-div">
                 <span class="ui-icon ui-icon-newwin"/>
                            Text - Export
    From the above script,
    I need to click the "export"
    Please anyone guide me to form a WSH script for clicking the "Export"
    So far my code is
    Set IE = CreateObject("InternetExplorer.Application")
    Set WshShell = Wscript.CreateObject("Wscript.Shell")
    IE.navigate "url"
    IE.Visible = True
    Wscript.sleep 10000
    IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_ddl_datefilter4").focus()
    WScript.sleep 10000
    IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_ddl_datefilter").SelectedIndex=4
    WScript.Sleep 10000
    IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_txt_fromdate").value = "30 Jun 2014"
    WScript.Sleep 10000
    IE.Document.getElementbyID("ctl00_ContentPlaceHolder1_txt_todate").value = "04 Jul 2014"
    WScript.Sleep 10000
    IE.Document.getElementbyID("a_genslasummary").click()
    WScript.sleep 10000
    Thanks in Advance
    Naveen

    There is nothing to click on export.  It is just text.  YOu also cannot click on anything that does not have an event associated.  Many events ae hidden in JS code.
    None of the objects in your HTML have IDs so they will not be easy to find.
    ¯\_(ツ)_/¯

  • Views for list web parts. Is there a way to allow users to change the view for a list web part without being redirected?

    Hi,
    I added a list view web part into a SharePoint 2013 page and it  is working as expected, except for one thing.
    I have enabled the option for the user to change the view for the web part. However when the user changes it, the user is redirected away from the page containing the web part, to the URL of the list itself.
    Is there a way to circumvent this issue so when the user selects a different view it updates the listing in the web part itself, rather than the user being redirected?
    Thanks in advance for the help.
    Regards,
    P.

    Hi,
    Please understand that one page can only display one view. You could find it out by observing the Address in browser when switching among different views for a list.
    If you would like to change the view of a list web part, you could go to web part propertites > Select view and configure it.
    In addition, here is a thread with similar requirement that might help:
    http://social.technet.microsoft.com/Forums/en-US/18dba190-5ee2-4b50-b005-1360d862f4ba/how-can-end-user-change-the-view-in-a-list-view-web-part?forum=sharepointgeneralprevious
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Multiple errors opening up a App for Sharepoint in VS2013

    I have every pre-requisite installed on my Server 2008 R2 VM.
    I launch VS2013, I have added my Azure web site and I have logged into my o365 account successfully. When I create new Project, App for SharePoint, the solution opens up in VS and I immediately get 5 errors:
    Error 1 The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) C:\Users\administrator.SHAREPOINT\documents\visual studio 2013\Projects\SharePointApp1\SharePointApp1Web\Controllers\HomeController.cs 1 17 SharePointApp1Web
    Error 2 The type or namespace name 'SharePointContextFilter' could not be found (are you missing a using directive or an assembly reference?) C:\Users\administrator.SHAREPOINT\documents\visual studio 2013\Projects\SharePointApp1\SharePointApp1Web\Controllers\HomeController.cs 12 10 SharePointApp1Web
    Error 3 The type or namespace name 'SharePointContextFilterAttribute' could not be found (are you missing a using directive or an assembly reference?) C:\Users\administrator.SHAREPOINT\documents\visual studio 2013\Projects\SharePointApp1\SharePointApp1Web\Controllers\HomeController.cs 12 10 SharePointApp1Web
    Error 4 'System.Web.Mvc.Controller.User' is a 'property' but is used like a 'type' C:\Users\administrator.SHAREPOINT\documents\visual studio 2013\Projects\SharePointApp1\SharePointApp1Web\Controllers\HomeController.cs 15 13 SharePointApp1Web
    Error 5 The name 'SharePointContextProvider' does not exist in the current context C:\Users\administrator.SHAREPOINT\documents\visual studio 2013\Projects\SharePointApp1\SharePointApp1Web\Controllers\HomeController.cs 17 29 SharePointApp1Web
    I can fix error 1 by manually adding the reference but the others I can't, no matter how many pre requisite exe/msi I re run.
    Can anyone help?

    Hi,
    Installed the following prerequisites to solve the problem:
    ◾Turn on "Windows Identity Foundation 3.5" in Windows Features
    ◾Installed "Windows Identity Foundation 4.0 (sic) SDK" from MSDN
    ◾Installed ASP.NET Web Tools Refresh for Visual Studio 2013 Preview
    ◾Installed SharePoint 2013 Client Components SDK
    ◾Run Visual Studio as Administrator!
    Here is a blog with the similar issue for your reference:
    http://alexduggleby.com/tag/sharepoint/
    Best Regards,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Error trying to create App for SharePoint Online

    I'm trying to create my first app for SharePoint Online using Visual Studio 2012. I believe I have all of the pre-reqs installed/configured. I have created a dev site in our SharePoint Online environment. I am a Site Collection administrator for that site.
    When I open VS2012, and try to create a new app project, it prompts me to connect to my dev site. When I enter the URL for that site, it give me the following login:
    We use ADFS, so when I enter my email address, it redirects me to my organizations federated login:
    Once I login, it takes me to the screen that reads "Error: An error has occurred on the server" with the standard SharePoint correlation id.
    I can't seem to get past this, and it won't let me start the new app project. Any thoughts on how to proceed?
    Thanks in advance,
    cflbasser

    Here is the correlation error screen for reference:
    When I click "go back to site", it takes me here:

  • The XIr3 SharePoint Web Part for Webi is throwing errors to SharePoint.

    Hi Admin's, Have any of you seen this error... We've built an XIr3 environment to expose Webi via the PIK webpart to SharePoint as a reporting portal. The backend is Sql linked servers via an OLEDB provider from a vendor named OSI (PI historian). The environment rocks, and the BO/SAP software is doing exactly what we want it to, one admin issue though. BOXI is spamming our SharePoint admin with two pesky messages "Error: Failure in loading assembly: BusinessObjects.SharePoint.Utilities, Version=10.0.3300.0" and the same prefix with version 11.0.3300.0. Have any other admins experienced this? The configuration is working fine in production, our dev burn throws these two, and it is essentially preventing us from upgrading our DotNet framework from 2.0 to 3.5 which is the only  component in flux. The SP version is 12.0.633.5000. I just need to stop spamming my SharePoint friends and let them do their upgrade!

    The search center is just a collection of pages that has the appropriate search web parts.  YOu can change the Search Settings at the site or the site collection to change the results page used.  If you add a results page with the appropriate
    web parts to the site you can send the results anywhere.  But building a search center is the easiest way to do that.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • HFM 933, error executing vb script %0 (for rules file)

    i have a HFM rules file that is error-free, but sometimes, when i run a consolidation via SmartView, it is aborted and the error is "Error Executing VB Script %0".
    Does anyone know why this occurs?
    Thanks in advance.

    The error message you shared may not have anything to do with HFM rules. There are a number of things that can generate a VBScript error: HFM rules, HFM custom member lists, or permissions problems/configuration problems with IIS. Smart View uses IIS, so maybe this is a configuration issue there. If you log out and log back in again, perform the very same activity successfully, it could mean you have load balance problem, or some other network related error. If it's a permission problem on the server, it will affect all users in the same way. An HFM member list problem would reveal itself any time the member list is called: whether through HFM's forms, grids, smart view, or Reports.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is Windows Script right for me?

    TL;DR I'm trying to automate a program running every two weeks and performing a function then shutting off.
    I have zero programming experience but I'd like to automate a mundane task that I often forget to do.  I'd like ArcGIS to open automatically and run a function that's already created.  Is this possible and where should I begin?  Do I need
    to get some background knowledge prior to learning windows script?

    Yes, you could use powershell (or several other script languages). Start here:
    http://resources.arcgis.com/en/help/main/10.2/index.html#//0154000005p3000000

  • Linq to Sharepoint web part erroring out

    I am getting the following error:  Cannot find corresponding storage member for member Id.
    This is my first time using linq to sharepoint
    My code is below.  Any suggestions are appreciated.
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Windows.Forms;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Client;
    using Microsoft.SharePoint.WebControls;
    using Microsoft.SharePoint.Linq;
    namespace LinqVendorDropDown.DropDown
        [ToolboxItemAttribute(false)]
        public class DropDown : WebPart
            DropDownList drpList = new DropDownList();
            String drpListSelected = "";
            protected override void CreateChildControls()
                // Get DataContext from page context
                DataContext data = new DataContext(SPContext.Current.Web.Url);
                // Get SharePoint list
                EntityList<Vendor> VendorsSPList = data.GetList<Vendor>("Vendor");
                // Query for vendors that are Active
                var VendorsActive = from vendor in VendorsSPList
                where vendor.Active
                select vendor;
                drpList.DataSource = VendorsActive;
                drpList.DataTextField = "Title";
                drpList.DataValueField = "ID";
                drpList.DataBind();
                drpList.Items.Insert(0, "Select a Vendor");
                drpList.AutoPostBack = true;
                Controls.Add(drpList);
                drpList.SelectedIndexChanged += new EventHandler(drpList_SelectedIndexChanged);
            void drpList_SelectedIndexChanged(object sender, EventArgs e)
                try
                    //set the selected value and logic
                    drpListSelected = drpList.SelectedValue;
                    this.Page.Response.Redirect("http://Site/Lists/Vendor/DispFormVendor.aspx?iD=" + drpListSelected);
                catch (Exception ex)
                    //  LogManger.WriteLog(" Error in EventCalendarWebPart.cs ddlAllLists_SelectedIndexChanged()" + ex.ToString());
                    Console.WriteLine(" Error in DropDown.cs ddlAllLists_SelectedIndexChanged()" + ex.ToString());
            protected override void Render(HtmlTextWriter output)
                EnsureChildControls();
                base.RenderContents(output);
        [ContentType(Name = "Item", Id = "0x01002E509ADD09F3314CB61CB5D1F8A0FCA6")]
        public partial class Vendor
            [Column(Name= "ID", FieldType = "Integer")]
            public int Id { get; set; }
            [Column(Name = "Title", FieldType = "Text")]
            public int Title { get; set; }
            [Column(Name="Active", FieldType="Boolean")]
            public bool Active { get; set; }

    I got it to work.  I just removed the ID field.  Apparently sharepoint doesn't allow you to handle that field

Maybe you are looking for