locked
Individualized pop up RRS feed

  • Question

  • I recently had a team member request a pop up for important dates on the share point.  Other team members do not want this feature.  So here is my two part question:

    Is it possible to create a pop up for date reminders with in sharepoint?

    Can it be individualized to the user?

    BTW, we are running 2007 version

    Thank you


    • Edited by grcoleman Thursday, May 9, 2013 11:55 PM
    Thursday, May 9, 2013 11:54 PM

Answers

  • Hi,

    Yes you can definitely do this using jQuery.

    You can fetch the current user logged in through jQuery in following way:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function() {   
        var CurrentUser = $("a:contains('Welcome')").text();
        var user= CurrentUser.substr(8,CurrentUser.length);
     
    });

    Now you have a variable 'user" which has your current user, you can use this to restrict users to dislay these pop ups.

    for example:

    if(user="John" || user="Alex" || user="Jack")

    {

    //pop up logic here

    }

    Regarding displaying pop up, what is the source from where you want the dates to be poped up.. you logic in above code will depends on that.

    Hope this helps.

    -------

    Regards

    Ankur

    • Proposed as answer by RajKumar26 Thursday, May 16, 2013 4:59 AM
    • Marked as answer by Hemendra Agrawal Tuesday, May 21, 2013 11:39 AM
    Tuesday, May 14, 2013 8:10 AM

All replies

  • Hi,

    Yes you can definitely do this using jQuery.

    You can fetch the current user logged in through jQuery in following way:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function() {   
        var CurrentUser = $("a:contains('Welcome')").text();
        var user= CurrentUser.substr(8,CurrentUser.length);
     
    });

    Now you have a variable 'user" which has your current user, you can use this to restrict users to dislay these pop ups.

    for example:

    if(user="John" || user="Alex" || user="Jack")

    {

    //pop up logic here

    }

    Regarding displaying pop up, what is the source from where you want the dates to be poped up.. you logic in above code will depends on that.

    Hope this helps.

    -------

    Regards

    Ankur

    • Proposed as answer by RajKumar26 Thursday, May 16, 2013 4:59 AM
    • Marked as answer by Hemendra Agrawal Tuesday, May 21, 2013 11:39 AM
    Tuesday, May 14, 2013 8:10 AM
  • Yes, it does.

    Can I do this on the sharepoint itself or do I need to code off designer?

    Wednesday, May 15, 2013 4:59 PM
  • Hi,

    Just add a content editor web part and add the script in Source Editor of this web part.

    --------------------------

    Regards

    Ankur

    Please mark my answer if it helped you, I would greatly appreciate it.


    Thursday, May 16, 2013 4:59 AM