.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

delete document button in ribbon gives javascript error: g is not a function

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :SharePoint


We have a default SharePoint 2010 installation. So an out of the box site template, out of the box document libraries/lists etc, out of the box theme (default one) etc.

When we check the checkbox next to a document in the shared documents library, the tab in the ribbon automatically switches to the document tab. In this tab there is a button "delete document". When I click that I get a confirmation request, I click OK, and then I get a little yellow box in the upper right corner that tells me SharePoint is deleting the document, and then nothing happens.

The document stays where it is, no refresh of the page as SharePoint should do...

I have a javascript error, and in FireFox it tells me "g is not a function" on line 2 of the file inplview.js?rev=AohvE9XEf%2FI78tuaw1TGAA
Line 2 contains like 100 javascript functions on the same line, so it's impossible to find out which function or command throws the error.
This is not a file created by me, so I guess it comes with SharePoint and that I should not touch it.

So what do I do now?
I have another server that we use for SharePoint testing, and there the button works as it should, so it's not SharePoint either...
Problem is that we use this server to give basic SharePoint trainings to our employees, so it's not a very good start

View Complete Post

More Related Resource Links

error calling javascript function in asp link button


I am using a asp link button in grid template field which calls a pop up,i need to find the link button's control in cs page.

my link button code

<asp:LinkButton runat="server" ID="hlQName" Text='<%# Eval("QuestionnaireName")%>' OnClientClick

BDC + Document Information Panel Javascript Error


I hope someone here can shed some light on this one...


We have a document library configured with a few content types and document information panels for those items. Also on this list we have a BDC column setup to pull client names from MS CRM. This works fine on the list itself, however, in Word 2007 - the picker does not show up in the DIP, so we cannot easily select clients without knowing the name (first issue).

Secondly, if we enter in a client name, or partial, we recieve the following error:

"There was an error in the validation code" - with the following details:
Document Information Panel cannot complete this action, because of an error
in the form's code.
The following error occurred:

Object required
FileTongue Tiedcript.js

Any help is appreciated!

how to delete javascript function by asp.net?


hi there
i have a function in javascript who i use for load all point in my google.maps

so, i need to reset every time in the postBack for load new point
how can i do? 

Hide ribbon, Hide site content/recycle button. Caledar overlay. Document publishing. Other questions


I have a 2010 farm operational and working well. I had a few questions.

(1) How to disable ribbons from appearing on the top (for anonymous sites).

(2) When I move the mouse over a tab in the top bar, how do I display a banner. It was easy enough in 2007, but I am not sure in 2010.

(3) I have disabled quick launch. But it still displays all site content and recycle bin. Is there a way to not to show those.

(4) Calendar overlay - Is this to display multiple calendars in one calendar using different colors to differentiate them. But if I had calendars in different site collections, then I guess due to the gallery boundary, I cannot calendars from multiple site collections.

(5) Document publishing - For some reason, this was easier in SPS 2007. I am not able to get it to work in 2010. Basically update a web page dynamically from a word document. Could anyone kindly provide a link. Also, would I be able to update a page in one site collection from a document from another site collection.

(6) Is it possible to move a folder/doc from one document library to another in one site collection (without webdav). Further, can I move a document library from one site collection to another.

Please advise. Sorry if I asked too many questions in the same post. I am newbie and this is my first post.



Unable to call javascript function through button's click



i have a javascript function that is placed in a separete file.There are some other functions also.

On a Button's OnClientClick i want to call a javascript function, but it is not called.When i put the same function in my aspx page that function is called. So how can i call that function which is placed in another .js file.

I  have taken some other controls like radio button , that is working fine when i call some functions  that is placed in the same .js file.

I have written like this in Button's OnClintClick property:



Delete document library throws "Exception from HRESULT: 0x80040E14" error


I am running WSS 3.0 SP2 running the Feb 2010 cumulative update. I have a particular document library I am attempting to delete. When I click on delete in the GUI, I get a page that says "Exception from HRESULT: 0x80040E14". Everything I've found so far on the web says this is caused by a SQL server that is out of space. That is not the problem in my case.

Additionally, I have looked at the logs in Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS and found the root cause. When I try to delete this document library, two errors are added to the log. They are

  • 06/16/2010 09:45:55.72     w3wp.exe (0x1798)                           0x0D44    Windows SharePoint Services       Database                          6f8g    Unexpected    Unexpected query execution failure, error code 8144. Additional error information from SQL Server is included below. "Procedure or function proc_SecGetI

onload call javascript function error


I want to initialise a text box value:

<script language="JavaScript" type="text/javascript" src="<%=ResolveUrl("~/Scripts/Common.js")%>">


<body onload="LoadDefaulteValue('revision')">

<input id="revision" type="text"  name="revision"/>

In the Common.js file, I have 2 functions:

function LoadCurrentDate(boxname) {
    var d = new Date();
    var months = new Array(12);
    months[0] = 'Jan';
    months[1] = 'Feb';
    months[2] = 'Mar';
    months[3] = 'Apr';
    months[4] = 'May';
    months[5] = 'Jun';
    months[6] = 'Jul';
    months[7] = 'Aug';
    months[8] = 'Sep';
    months[9] = 'Oct';
    months[10] = 'Nov';
    months[11] = 'Dec';
    document.getElementById(boxname).value = d.getDate() + '-' +

Javascript Function Expected Error


I'm using the CustomValidation Function to call my javascript but for some reason I'm not getting the * to indicate the error to the user. I keep getting a Function expected Error, so what is wrong with my javascript that's causing this error and why aren't I receiving the * notification? Thank you in advance for your help.


<script type="text/javascript" language="javascript">
    function checkAGITotal()
        var a = document.getElementById('<%= NumberInHouseholdTxtbox.clientid %>').value;
        var b = document.getElementById('<%= AGITotalTxtbox.clientid %>').value;

        if (a == "1" && b <= "27247" || a == "2" && b <= "35630" || a == "3" && b <= "44014" || a == "4" && b <= "52397" || a == "5" && b <= "60781" || +
        a == "6" && b <= "69164" || a == "7" && b <= "70736" || a == "8" &

How to call javascript function from Button CLick event



I have a createuserwizard. My CompleteUserWizard in CreateUserWizard is like this..

<asp:CompleteWizardStep ID="MessageStep" runat="server">





  <table style="height: 100%; width: 100%;">


   <td align="center" colspan="2" class="complete_text">






  Your account has been successfully created.




     <td align="center" colspan="2">

    <asp:Button runat="server" ValidationGroup="Createuserwizard1" CommandName="Continue" ID="ContinueButton" CausesValidation="False" Text="Continue" Width="65px" CssClass="Base" />







Button control to stop Javascript Function on slideshow


Hi everyone-

I've got this slideshow I've pieced together that fades in and fades out.  However, when pushing the Stop Button (same as the Play button) to stop on a slide, the Javascript function continues and fades out so it stops on a blank .  How can I alter this javascript function to only fade in, stop on the slide and not fade out when the stop button is pushed?

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="SlideShow7.aspx.vb" Inherits="SlideShow7" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
            margin: 50px 0px;
            padding: 0px;
            text-align: center;
            width: 475px;
            margin: 0px auto;
            text-align: center;
            padding: 20px;
            border: 1px dashed gray;
            background-color: Silver;

radio button checked changed event not firing with onclick javascript function



I have used below code.

<asp:RadioButton GroupName="grpAssoc" ID="rbtEvery" runat="server" Text="Everyone"
                                                                                    onclick="return doChangeAssociationType(0);" AutoPostBack="True" oncheckedchanged="rbtEvery_CheckedChanged"

but oncheckedchanged="rbtEvery_CheckedChan

Content page control passes as argument to javascript function


Here is the content page:


<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="JavaDynamicCopyValue.aspx.cs" Inherits="JavaDynamicCopyValue" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript" >
 function copyValue(input, output )
   ouput.value = input.value;
   return true;
 <asp:TextBox ID="txt1" runat="server" onchange="copyValue(this,document.getElementById('<%=txt2.ClientID%>'))"></asp:TextBox>
    <br />
    <br />
    <asp:TextBox ID="txt2" runat="server"></asp:TextBox>


I got a javascript run time error says output is undefined. if I view source of the page, the txt1 markup became:

<input name="ctl00$ContentPlaceHol

way of calling "javascript function of parent window from child window."

The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

>>>How to use javascript function in aspx file?



I have a file util.js and there some funtions in same file.

For example functions name are keyUp, keyDown, isNumeric, isAlphaNumeric

I have used these functions in aspx code behind in a textbox to restrict user that he may not be able to input any special character.

Before, I used the code directly in aspx file but I have do it for different textboxes therefore to avoid much coding in aspx file I created util.js and put all code in this file but how to use these particular functions in aspx file I couldn't find the way.

Anyone have idea. Do share with me.

I used the reference like this:


' Font-Names="Verdana" Font-Size="8pt" Onkeyup= "keyUp(event.keyCode)" Onkeydown="return isAlphaNumeric(event.keyCode);" onpaste="return false;">

ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Function name is missing ).


I Am Continiously Getting Error For Following Line Of Code, It Work  Fine In Other Database

Am I Doing Any Mistake

if (sh3itno != "" && dpsh3no != "")
                string queryy = "SELECT [CHEQNO] FROM [SH3MAST] WHERE (([CHEQDATE] = " + chqdate + ") AND ([FAVOUR] = " + favour + ") AND ([CHQTYPE] = " + ctype + ") AND ([TRSTN] = " + trstn + ") AND ([TRBANK] = " + trbank + ") AND ([SH3ITNO] = " + sh3itno + ") AND ([DPSH3NO] = " + dpsh3no + "))";
                OdbcCommand cmd3 = new OdbcCommand(queryy, connen1);
                string chqno =cmd3.ExecuteScalar().ToString(); (Here Iam Getting Error)
                tbl.Rows[i]["cheque no"] = chqno;
Stack Trace: 

[OdbcException (0x80131937): ERROR [S1000] [Microsoft][ODBC Visual FoxPro Driver]Function name is missing ).]
   System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) +39
   System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, Strin

javascript error


this line is giving error in javascript. Please correct it...

  $('#UnlockDetailsPanel').load('/confidentialdetails/UnlockDetailsUpdate.aspx #UnlockDetailsResult', { action: 'decline', request: <%= Request["request"] %> } );

error is _s.my.confidentialdetails is undefined



Enable Go Button after entering data in all fields using javascript funtion


Hi friends,

My page is having one gridview with check boxes,two textboxes and one button just like this see this link now i want to enable go button whenever user has select checkbox in gridview and he needs to enter text in two textboxes. i have written onkeyup event for two textboxes to test whether user enter text in textboxes or not but i am unable to write javascript function to check whether user has selected checkbox in gridview or not to enable go button .My requiremnet is user need to enter three inputs select atleast one checkbox in gridview and he needs to enter text in two textboxes.please friends pls tell me how to write javascript function to find whether user has selected the checkbox in gridview or not

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend