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

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

facebook notifications update with javascript

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :ASP.Net
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

View Complete Post

More Related Resource Links

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

SqlDataSource - Update Parameter with javascript

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

Facebook status update using C#

Hi Guys     I am trying to wirte a program so that I can do wall post/status update using my C# program  using facebook api . How to do this? please share complete code.   Thanks.

Can I update Project Field value via some javascript?

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

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

How to update JavaScript in SharePoint Ribbon Elements.xml file?


I created Elements.xml file that added button to Ribbon of Web Part page.
I created <CommandUIHandler tag and put JavaScript into CommandAction.
Everything works.

I inserted changes to JavaScript and built and deployed project in VS2010.
The button function was not changed the previous JavaScript was used. I uninstalled feature and rebuilt and redeployed project. The button functionality was not changed again.

What I have to do that JavaScript changes work in CommandAction?

Thank you in advance for any help.

Boris Nossov

javascript lost in update panel


Hi i am using an update panel inside this i am using a jquery image upload which works fine outside an update panel, but when inside i think the javascript is not instalising. i have tried using RegisterClientScriptBlock without success.

the javascript is belo, because its a document.ready how can i make sure this is not lost in a update panel?

$(document).ready(function() {

    /* example 1 */
    var button = $('#button1'), interval;
    new AjaxUpload(button, {
    //action: '/CustomHandlers/ImageUpload.ashx?id=99',
        action: '/CustomHandlers/ImageUpload.ashx?id=' + $('#ctl00_ContentPlaceHolder1_hdCompId').val(),  
        name: 'myfile',

        onSubmit: function(file, ext) {
            //check for valid files
            if (!(ext && /^(jpg|png|jpeg|gif)$/i.test(ext))) {
                // extension is not allowed

problem with user control+update panel+javascript


hai all,


Im having a aspx page which has 5 tabs inside a update panel..also I have a user control

Wen I click each tab im dynamically loading dat user control .

The problem is im using javascript in dat user control..

the user control has a button which displays a panel containing three grid views  n s activated by a java script as given below..

function Elig()



'<%=btnLegend.ClientID %>')).click(function(){


('<%=pBody.ClientID %>')).slideToggle('slow');




Wen i run the aspx page the first tab  successfully loaded with dat user control n a

Item update in the sharepoint list using web service with javascript



I am using below code for web services with javascript


function CreateListItem(Title)



    var soap1 = createEnvelope(Title);


    var ws = new ActiveXObject("Microsoft.XMLHTTP");    

      if(ws == null) 

       return null;





    ws.setRequestHeader("Content-Type", "text/xml; charset=utf-8");            







  function createEnvelope(Title)


     var batch;

var xmldoc;    

var ListName = 'S

How can you use javascript to call a SliderExtender (textbox) to update its value?


I am trying to develop two step size buttons + and -  so that when you click either one, the AJAX SliderExtender will magically move itself by one.

I have tried implementing the following functions:

document.getElementById ("Slider1_BoundControl").value = 5;
document.getElementById ("Slider1").value =5;

here's what happens, I see that the BoundControl textbox works and it gets updated to 5.  However, the slider still does not update to its new position.  When the slider moves, a postback will occur.

The Slider1 is the textbox that  is the targetID to SliderExtender1 .  The boundcontrolID is Slider1_BoundControl (textbox)

Anyone know ? thanks

Update JavaScript


I have this JavaScript which can format the 16 digit card no in this format A12E-D624-SAB1-992D

function FormatCardNo(BenefCardCntrl)
        var test = new RegExp("[^0-9,a-z,A-Z]", "g");
        var txt;
        var txtlength=0;
        var txtReturn;
        var field = document.getElementById(BenefCardCntrl);               
        txt = field.value.replace(test,"");
        txt = txt.replace(",","");
        txt = txt.toUpperCase();
        txtlength = parseInt(txt.length);
        if(txtlength > 16 )
            txtReturn = txt.substr(0,4) + "-" +  txt.substr(4,4) + "-" + txt.substr(8,4) + "-" + txt.substr(12,4)

Update Panel without Javascript



I am trying to add an update panel to my web form, but when the user has javascript disabled, the drop down index change event is never fired.  I want the update panel to function if javascript is enabled, but just disable itself when javascript is not enabled.  How would I go about this?



Call a Javascript after an updatepanel has finished update



I want a Javascript function to be called automatically after the UpdatePanel has finished updating its contents. I don't want to use:


and then call a JS function. This is because I have more than one update panels and I'll have to write all the condions to check which UpdatePanel was actually called and then do something. Can something be done using Triggers in UpdatePanel. Kindly let me know how this can be done.

It would be great of you could post a sample code too.

Thanks in advance.

ASP.NET, HTML, JavaScript Snippet Support (VS 2010 and .NET 4.0 Series)

This post covers another useful improvement in VS 2010 - HTML/ASP.NET/JavaScript snippet support. Snippets allow you to be more productive within source view by allowing you to create chunks of code and markup that you can quickly apply and use in your application with a minimum of character typing.

Visual Studio has supported the concept of "snippets" for VB and C# in previous releases - but not for HTML, ASP.NET markup and JavaScript. With VS 2010 we now support snippets for these content types as well.

call JavaScript - jQuery code from ASP.NET Server-Side

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side.
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