.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

Can I update Project Field value via some javascript?

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :SharePoint
Hi there, I've a webpart that's designed to update some project field value, this webpart is  located on a Project Details Pages. On this project details page, there is another MS Build-in webpart call Project Field webpart. Now when I clicked the Save ribbon button, the project field webpart will raise some client calls, at the same time my custom webpart will raise a post-back(update value via PSI) call which will kill the client calls..So is it possible for me update the project filed value via some javascript? so I'll no longer raise a postback. Or is it possible for me to capture the client calls event for MS webpart, then I can fired my own PSI code? Thank you,   Regards, Joe

View Complete Post

More Related Resource Links

Javascript price update ...hidden field ... asap

Hello Experts http://store.apple.com/us/configure/MC374LL/A?mco=MTc0Njg1ODA Like in this link i created a javascript function  === id , lenght , width , dept , capacity ,price ..<script type="text/javascript">function getproductdetail (id,len,wid,dep,cap,thick,prc)     {          document.getElementById('row1')=prc   }          </script>the same function is called at a new place where i pass only price .. i have to check if there is a price is present in 'row1' i have to add new prc to present one .. =================== thing is where i will retain the old value present .. How to check whether value is prsent in row1 or not ..... if i will choose hidden field where to use and how to check value for that ... Thanks

SharePoint Batch Update Auto Increment Field Value


Hello All,

I am making use of SharePoint List Batch Updating methodology in order to update the items in bulk. I build the query dynamically for each and every item using StringBuilder and process the data ultimately using 'ProcessBatchData' Method.

Now, I have a requirement where I have to increment a particular field value in the query while iterating through each item for building the query. How can I auto-increment a field value for each item in the batch query?


Mission Impossible? Use Javascript to Disable a Multi-Line Rich Text Field


Hey Community,

Here's a tough one that I have struggled with and so far have not been able to find an answer for - how do you use Javascript to disable a multi-line rich text field.  I have customized a SP Edit form by adding a CEWP.  In the CEWP I have added the Javascript below (only a partial code sample provided) to disable several fields in the form.  The code works fine for single line text fields but it does not work for multi-line rich text fields.  Any suggestions?

<script language="javascript">
//This runs the function when the form first loads

//This locks the fields the users should not modify
function lockFields()
  var theInputTFTitle = getTagFromIdentifierAndTitle("Input","TextField","Title");
  theInputTFTitle.readOnly = true;
  theInputTFTitle.style.color = 'gray';
  //alert(" Value: " + theInputTFTitle.value);//for testing

   var theInputDDLReplyStatus = getTagFromIdentifierAndTitle("select","DropDownChoice","Reply Status");
  theInputDDLReplyStatus.disabled = true;
  //alert(" Value: " + theInputDDLReplyStatus.value);//for testing

  var theInpu

Run a javascript function after UpdatePanel.Update()


I thought that adding the javascript within the ContentTemplate would cause it to run every time the UpdatePanel was updated.  For example, I would assume that for the following:

<atlas:UpdatePanel ID="UpdatePanel1" runat="server" Mode="Conditional" >
        Hello from inside the update panel!!!!
        <asp:Button ID="foo" runat="server" OnClick="foo_Click" Text="Click me to postback!" />
        <script type="text/javascript">alert('Javascript, baby!');</script>

 would cause the function alert() to run every time the UpdatePanel returns from the button click.  This is not the case, however.

How do I do this?  My update panel contains a scrolling Div and I

Update SharePoint List item using UpdateListItem web service with javascript

I'm using the Custom_AddListMenuItems function in a CEWP to add a menu item to each list item to Archive that item. This is achieved by updating a choice field in the item to 'Archived'. I'm trying to do this using the web service UpdateListItem web service to update the item using Javascript, but I can not find the correct code that updates the list item. I'm using this code:     var ctx=currentCtx;     var ciid=currentItemID;     var xmlHttp=null;     if (confirm("Are you sure you want to Archive this item?"))     {         var soapRequest = '<?xml version="1.0" encoding="utf-8"?>'+             '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'+             '    <soap:Body>'+             '        <UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+         

Javascript to update value in Textbox

Hi I have a javascript file, which creates a calendar picker. This file is used through out the application and is a piece of code that I have to use because my .Net application is part of another application which uses this piece of JavaScript code.Anyhow, with the calendar picker I can save the date into a textbox, but the problem that I have is the format. Unfortunately, I cannot change the calendar picker code because this will affect other parts of the application. Therefore, what I am looking to do is to reformat the date on the textbox control. This I can do but only when I use the javascript event onfocus.Now, my question is this, is there away in javascript or with jquery that when a value enters into a textbox that this value is then reformatted to the format I want without postback or clicking on the textbox?Thanks

Update field Linq

HelloI want to update one field of one record using linq. I use below codeDim p1 = (From p In db.Products_          Where p.ProductID= 1320 _                 Select p).Single        p1.CategoryID= p1.CategoryID+ 1        db.SubmitChanges()The issue is above query first execute select command and then Update command. and then update all fields of selected record. and this cause overflow to DB.I need to only update one field value. How Coudl I get below sql command. (only update one field)update Productsset CategoryID= CategoryID+ 1where ProductID=1320

Update a field in a gridview to False on a Button Click

 Hi, Ive got a list of records in a gridview (from an SQLDataSource) where a field value is set to True.  I've also added a "reset" button in a template field at the start of the row in the Gridview. What I would like to do is allow the user to click the reset button on a particular row and 'reset' the true value to 'false' (updating the source data). Are there any idiot proof tutorials to do this??? Many thanks for your help! Fiorano

SqlDataSource - Update Parameter with javascript

Hello, It's possible change the DefaultValue of Parameter with javascript?   Tks

facebook notifications update with javascript

Dear all, how can i make notification counter like facebook notifications in the top left of the page , the question is how to make this counter and update a value using javascript or asp.neti want to make something like that , that is updated every 5 min. with the new counter. if anyone can help me with some code tips , it will be greatfulthanks and regards, Mina Jeffrey

How do you update a Lookup Field from CAML by Name rather than ID

Hi, I have the following batch update in my code: xml += "<Method ID='" + currentID + "' Cmd='Update'>"; xml +=   "<Field Name='ID'>" + ID + "</Field>"; xml +=   "<Field Name='FileRef'>" + fileRef + "</Field>"; xml +=   "<Field Name='Title'>" + doc.NewFileName + "</Field>"; xml += "<Field Name='Keywords'>" + doc.Keywords + "</Field>"; xml +=   "<Field Name='Select_x0020_Type'>" + ((doc.TypeName == "General") ? 1 : 2) + "</Field>"; xml +=   "<Field Name='Population'>" + "Demography" + "</Field>"; xml += "</Method>"; The Population field is a lookup. It works if I put the ID of the ListItem in there, but not if I put the name - I need to put the name in. Can anyone help? Thanks. John.  

Update Managed Metadata Field with using Lists.asmx service

Hello! I am trying to update Managed Metadata Field with using Lists.asmx. I know that I must use this format WSSID;#VALUE|GUID. But I don't Know how I can get WSSID and VALUE Guid! Can I get them with using lists.asmx! Thanks!!

Project won't update certain changes

Not sure if this belongs in this section or not but a coworker converted a VS2003 project to 2005 a while back and I have been making some updates to it. I made a few changes to the code of a CS file and when I rebuilt the site, the changes were there. However, I am now making changes to a different but similar CS file and when I rebuild the site, the site is still performing the functions of the old code and not updating. Anyone know what could be causing this? Thanks!

javascript for field validation on a textbox...

I'm looking at doing the validation for the email in javascript since we have asp.net 1.1. I can get it to just alert fine, but once I add the return validation it doesn't fire. Me.ImageButton2.Attributes.Add("onclick", "return validation(this);") <script language="JavaScript"> <!-- function validation () { var test=""; test = document.ticketForm.emailAddress.value; if (test == "xyz") { alert(test); return false; // validation failed } --> </script>

event receiver to update created field of uploaded document

Hi,   I need to update the created column with the document creation time . 1) First should i use ItemAdding event or Item Added event 2) how do i get the file created properties and assign it to the cdocument library created column.

Generic ListItem Field Update function?

Just wondering: is there a built-in utility function to set field value for any field type? E.g., SetFieldValue(SPListItem, object value1, optinal object value2, optional object values) You know so boring to update fields considering so many different types. I bet MS guys did one somewhere!? thanks,

Multiline text field in document library and item update from Word trouble

Hi I have faced a bit of odd problem. Here is the scenario: I have document library with text columns (multiple lines of text) that are set to unlimited length. I have a workflow that runs with Word documents (.docx) that stores information in XML to this field. Everything works perfectly until document is edited in Word and saved back to document library. After Word saves my document in document library, the multiline text field is "cutted", only 7 rows of text is saved to my field. I have tried hiding my text field, making it sealed or readonly, but still Word breaks my field. Funniest thing is that when editing document in Word, this field should not have any changes (meaning that I dont show my "long text field" in document information panel back in Word). I have tried also creating event handler to handle itemupdating event in document library where I switch spweb.parserenabled property to false and in itemupdated event I switch it back on. Also I have tried to remove all line changes from XML with no luck. This XML saving to long text field works perfectly with many other places but in this one environment this does not seem to work :( I am looking forward to any suggestions what to try next. I have been wondering about using the eventhandlers and trying to "protect" my text field with some logic but that is still just a thought.   T
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