Find the startpage of current web using javascript?

I want to hide a "div" from all startpages/welcomepages. But I cant just compare "start.aspx" and my url parameter cause sometimes the page "start.aspx" isn't there in the url. Is there a way to know if I'm on a "startpage"
or not using javascript?

SPWeb has RootFolder which internally has WelcomePage property. You can use that to get this information
var clientContext = new SP.ClientContext.get_current();
var spWeb = clientContext.get_web();
var rootFolder = spWeb.get_rootFolder();
clientContext.load(rootFolder, 'WelcomePage');
clientContext.executeQueryAsync(Function.createDelegate(this, onQuerySucceeded), Function.createDelegate(this, onQueryFailed));
function onQuerySucceeded() {
alert(rootFolder.get_welcomePage());
function onQueryFailed(sender, args) {
alert('error');
In case of publishing web
var web = context.get_web();
var pubWeb = SP.Publishing.PublishingWeb.getPublishingWeb(context, web);
context.load(pubWeb, 'DefaultPage');

Similar Messages

  • How to check/find the size of current ROLLBACK segment in oracle 10g

    How to check/find the size of current ROLLBACK segment in oracle 10g ? Kindly help

    A rollback segment name like "_SYSSMU231$" is used when you have Automatic Undo Management enabled.
    The only relevant parameters are :
    1. UNDO_MANAGEMENT=AUTO
    2. UNDO_RETENTION=n minutes ==> this is what everyone should be interested in
    3. The sizes of the Undo Tablespace datafiles and whether AUTOEXTEND is ON or OFF
    No one should be interested in the size of a single undo segment when Automatic Undo Management is enabled.
    Possible causes of ORA-01555 errors in Automatic Undo Management
    a. UNDO_RETENTION is too low
    b. Undo tablespace is too small
    Hemant K Chitale

  • The scan is currently in use .

    the scan is currently in use . Please wait until your previous task is complete and then try again late

    Hello @Olad , and welcome to the HP Forums, I hope you enjoy your experience!
    I see you're having issues scanning.  I would like to help!
    Do you have any issues making a copy, as opposed to a scan?
    I'd recommend starting with a power reset.  Disconnect the power cord from the printer and the power outlet, then wait 60 seconds. After 60 seconds, plug the printer back in. Ensure you plug the printer directly to a wall outlet. Make sure to bypass any sort of surge protector or power bar.
    I would also recommend downloading and running the HP Print and Scan Doctor.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Detect the Popup blocker settings by using javascript is it possible? if yes can any one suggest how to implement?

    How can i detect the Firefox the Popup blocker settings by using javascript, so that i can show message to user, saying" popup settings are on, please turn off or allow the site". can any one help me out. Thanks in advance.

    Hi William,
    I am writting a sample code for you :
    go to code wizard, select your node VBAk (where you have the attribute VBLEN )
    and select the attribute. Now code will be automatically generated.
        DATA LO_ND_VBAk TYPE REF TO IF_WD_CONTEXT_NODE.
        DATA LO_EL_VBAk  TYPE REF TO IF_WD_CONTEXT_ELEMENT.
        DATA LS_VBAk  TYPE WD_THIS->ELEMENT_VBAk.
        DATA LV_VBLEN TYPE WD_THIS->ELEMENT_VBAk-VBLEN.
      navigate from <CONTEXT> to <VBAk> via lead selection
        LO_ND_VBAk = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX__VBAk ).
      get element via lead selection
        LO_EL_VBAk  = LO_ND_VBAk ->GET_ELEMENT( ).
      alternative access  via index
      lo_el_VBAk  = lo_nd_VBAk ->get_element( index = 1 ).
      @TODO handle not set lead selection
        IF LO_EL_VBAk  IS INITIAL.
        ENDIF.
      get single attribute
        LO_EL_VBAk ->GET_ATTRIBUTE(
          EXPORTING
            NAME =  `VBLEN`
          IMPORTING
            VALUE = LV_VBLEN ).
    Now based on the value LV_VBLEN select values from database table and fill the internal table.
    DATA LT_VBAk  TYPE WD_THIS->ELEMENTSVBAk.  " this the table to keep the values
    select VBLEN ERDAT ERNAM AUDAT from VBAK into table LT_VBAk where VBLEN = LV_VBLEN. 
    Now you can bind the table to appropriate node.
    Regards,
    Monishankar C

  • I am finding  the No. of threads in use through the RWB

    Hi,
    WE have 2 server nodes,we want to compare the load distribution.
    I am finding  the No. of threads in use through the RWB -> Component Monitoring -> engine status -> Queues ... to find thread count (in use).
    I could see the thread count as 0.I even want to monitor Queues AFWCall.......
    when i press on AFWCall It shows null pointer exception.
    Pl help.
    Srini

    Hi Srinivas,
    I expect the error could be queue configuration on J2EE stack.
    That is set the Thread count corresponding to AFW queue, by increasing the thread count sufficiently we can observe the status of queue to be true.
    use the following url to find the status of the queue:
    https://<hostname>:<J2EE port>/MessagingSystem/monitor/systemStatus.jsp
    I think your problem gets resolved.
    Regards,
    Suraj Kumar

  • Where can I find the Tables script that are used in the Documentation

    Hello All,
    Where can I find the Tables script that are used in the Documentation, Like Sales, Customers, employee, department.......
    Appreciate any Help
    Thanks & Regards
    Madhu K

    10g
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/scripts.htm#sthref77
    9i
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96539/scripts.htm#4216

  • How to find the hidden objects in Webi Rich client  report 4.0 sp 04 ?

    Hi,
    How to find the hidden objects in Webi Rich client  report  at BI 4.0 sp 04 ?
    Best Regards,
    ASR

    Hi Sai,
    Go to Report Element Tab-->There you have a Tab Cell Behaviors.
    When you flip between 'With Data' and 'Structure Only' under 'Design' Tab,you can see the some cells will be hide/Un hide behavior,if hiding of cells applied.
    Select that cell and then Under 'Cell Behaviors'-->'Hide' Tab-->and choose Show Option.
    Regards,
    Venkat P

  • Where is my credit balance? I was gifted $50 for Christmas and used it but cannot find the balance and how to use it.

    I was gifted $50 for Christmas and used it ti buy a couple of albums but now canot find the balance and how to use it.

    My account's balance shows at the top left of the store's page on my computer's iTunes, and by logging in to view my account via the Store > View Account menu option. On my devices it shows at the bottom of, for example, the Featured tab in the App Store app under my account id (or you can view your account via Settings > iTunes & App Store and it should show on the screen that you are taken to).
    If nothing shows then have you checked your account's purchase history ? If you log into your account on your computer's iTunes via the Store > View Account menu option, you should then see a Purchase History section with a 'see all' link to the right of it. Click on that and you should then see a list of your purchases.
    If you have a balance then you just need to click on item's price to buy it, assuming that your balance covers its price.

  • How do I set an Apex mulri-row reports form value for the specifc current row using Javascript?

    I have a multi-row region based on a table in which I have two particular columns of interest.  The first has an LOV defined for which I have set up a pick-list of codes associated with the item's status as "OK" or having some problem, for which there are a small number of set codes associated.  Most rows will be OK, but when there is a problem, the pick-list will be used.
    When that pick list has been used, there is an optional "comments" column that can be filled in.  I want my screen to dynamically enable/disable a pushbutton that links to the comment based on the code.  This being row-based, the push-button needs enabling or disabling by row, not as a whole "conditional column".  That bit is ok, I think, but I don't know and can't find the syntax for how within the javascript onchange function I set the current row value for a different column to the one that triggered it.
    My header function (that doesn't work) is going to be something like this (where the status column LOV having a value = 6 means "OK").  Note I'm using alert for a debug mechamism.  The $s line is my failed attempt to set he column value, here with a hard-coded string "Changed COMMENTS":
    <script type="text/javascript">
    function doActivateButton(object)
      if(parseInt(object.value)!='6')
        alert('It is not 6!');
        $s('#COMMENTS','Changed COMMENTS','Changed COMMENTS',TRUE);
      else
        alert('It is 6, you know!');
    </script>
    Ideally, I want any existing comments blanked if the user picks "OK" (6) as the new status, whereas for debug above I'm setting the hardcoded debug string.  You will probably also note I realise I haven't properly understood the purpose of the third parameter in the $s API.
    (This is a reports region, by the way.  A detail block, in forms-speak, with a header block above it.)
    Thanks for any assistance.
    Mark

    Sorry, versions are: Apex 4.1 on Oracle RDBMS 11.2.

  • Finding a component inside jsf fragment using javascript in adf

    Hello all,
    I am using jdeveloper 11.1.1.5.
    I want to find a component inside my jsf frgament using javascript.
    Like inside jspx page I was able to find the component using
    AdfPage.PAGE.findComponentByAbsoluteId("ID");
    Now my requirement is I have a jsf fragment and I want to find component inside jsf frgament using javascript.
    How can I find the component?
    Please suggest
    Thanks
    Edited by: Navin K on Dec 21, 2011 4:24 PM

    Hi all..
    I am using Jdeveloper 11.1.2.1.0
    The code i used is given below. When i run this i always getting the message (ie region not found) in the else case of java script.
    How can i solve this. How can i take the region r1 in the javascript..
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <af:document title="Index.jsf" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1">
    <af:pageTemplate viewId="/AssetTrackingTemplate.jsf" id="pt1">
    <f:facet name="top"/>
    <f:facet name="first">
    <af:panelAccordion id="pa1">
    <af:showDetailItem text="Master Details" id="sdi1">
    <af:spacer width="10" height="10" id="s3"/>
    <af:commandLink text="Home" id="cl8" inlineStyle="font-size:small; font-weight:bold;">
    <af:setActionListener from="/WEB-INF/task-flow-Home.xml#task-flow-Home"
    to="#{pageFlowScope.dynRegionBean.taskFlowId}"/>
    </af:commandLink>
    <af:spacer width="10" height="10" id="s1"/>
    <af:tree value="#{bindings.GenTopMenu1.treeModel}" var="node"
    selectionListener="#{bindings.GenTopMenu1.treeModel.makeCurrent}"
    rowSelection="single" id="t1">
    <f:facet name="nodeStamp">
    <af:group id="g1">
    <af:outputText value="#{node.Description}" id="ot2"
    rendered="#{node.MenuType==1}"/>
    <af:commandLink text="#{node.Description}" id="cl1"
    rendered="#{node.MenuType==2}" partialSubmit="true"
    immediate="false"
    actionListener="#{pageFlowScope.dynRegionBean.launchTaskFlow}">
    <f:attribute name="Definition" value="#{node.Definition}"/>
    </af:commandLink>
    </af:group>
    </f:facet>
    </af:tree>
    </af:showDetailItem>
    </af:panelAccordion>
    </f:facet>
    <f:facet name="middle">
    <af:region value="#{bindings.dynamicRegion1.regionModel}" id="r1"/>
    </f:facet>
    <f:facet name="end"/>
    <f:facet name="copyright">
    <af:outputText value="All Rights Reserved By Innovation ITC" id="ot1"
    inlineStyle="text-align:center; color:inherit;"/>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    <f:facet name="metaContainer">
    <af:resource type="javascript">
    function customHandler(event) {
    var region=AdfPage.PAGE.findComponentByAbsoluteId("r1");
    if(region!=null)
    alert("Region Found");
    var exportCmd = region.findComponent("cb1");
    var actionEvent = new AdfActionEvent(exportCmd);
    actionEvent.forceFullSubmit();
    actionEvent.noResponseExpected();
    actionEvent.queue();
    else {
    alert("Region Not Found")
    </af:resource>
    </f:facet>
    </af:document>
    </f:view>
    Thanks,
    gtg.
    Edited by: gtg on 08-Feb-2012 00:14

  • FInding the Reporting Services 2014 Web Service in Visual Studio 2013

    Hello
    I am trying to figure out how to Find the webservice for my SSRS 2014 Installation from Visual Studio 2013.
    I looked at this article
    http://msdn.microsoft.com/en-us/library/ms155398.aspx
    And it seemed to say I should use:
    http://<machine name>/Reports_<Machine Name>/ReportService2010.asmx?wsdl
    I am doing this from the Add Web Reference part of Visual Studio 2013
    When I do this I get the error
    There was an error downloading 'http://<machine_Name>/Reports_<machine_Name>/ReportService2010.asmx?wsdl/_vti_bin/ListData.svc/$metadata'.
    The request failed with HTTP status 404: Not Found.
    Thanks in Advance.
    -Dick

    http://<machine name>/Reports_<Machine Name>/ReportService2010.asmx?wsdl
    Hello Dick,
    The second <Machine Name> should be the "<Instance Name>" instead, if you are using a named instance of SSRS. If it's a Default instance, then use simply
    http://<machine name>/Reports/ReportService2010.asmx?wsdl
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Fetching Manager Attribute For The User In PeoplePicker Control Using JavaScript/JQuery

    Hi Everyone,
    I need to fetch the Manager, Department and Title information for user listed in PeoplePicker control on SharePoint site and List them in textbox using JavaScript.
    Please suggest the JavaScript code.
    Regards~
    Deepak Arora
    If you Find the Answer | Article | Blog Helpful Please Vote As Helpful / Mark As Answer

    Hi,
    According to your post, my understanding is that you want to get the user’s manager, department and title.
    We can use the GetUserProfileByName operation of the SPServices to achieve it, you can download it in the
    CodePlex.
    You can first retrieve the user of the People Picker control.
    http://sympmarc.com/2012/04/22/working-with-sharepoint-people-pickers-with-jquery-a-new-function-called-findpeoplepicker/
    http://sharepoint.stackexchange.com/questions/80839/unable-to-get-user-name-from-the-people-picker-control-using-jquery
    Then we can retrieve the user’s information using the SPServices.
    I have made a simple code demo to retrieve the user’s manager, department and title as below, you can have a look at it.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://sp/Shared Documents/jquery.SPServices-2014.01.min.js"></script>
    <script type="text/javascript">
    // When the body is loaded, the onload event handler executes each function whose name is contained in this array.
    $(function(){
    var managerName;
    var title;
    var department;
    $().SPServices({
    operation: "GetUserProfileByName",
    async: false,
    AccountName: $().SPServices.SPGetCurrentUser(),
    completefunc: function (xData, Status) {
    console.log($(xData.responseXML).find("PropertyData").parent().html);
    $(xData.responseXML).find("PropertyData > Name:contains('Manager')").each(function() {
    managerName = $(this).parent().find("Values").text();
    //alert("the manager is"+managerName);
    $(xData.responseXML).find("PropertyData > Name:contains('Title'):eq(0)").each(function() {
    title = $(this).parent().find("Values").text();
    //alert("the Title is"+title);
    $(xData.responseXML).find("PropertyData > Name:contains('Department')").each(function() {
    department = $(this).parent().find("Values").text();
    //alert("the Department is"+department);
    var obj1=managerName+title+department;
    $("#Test").text(obj1);
    </script>
    <span id="Test"></span>
    More reference:
    http://sympmarc.com/2012/04/22/working-with-sharepoint-people-pickers-with-jquery-a-new-function-called-findpeoplepicker/
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How do I find the original photo that is used in one of my contact photo in "Contacts"?

    Hi everyone,
    I am in a bit of a dilemma. I desperately need to find and/or access the original photo used as a contacts photo in the OSX built in app "Contacts". I can resize the photo and I can see it in full but I can't find the original anywhere and in any way.
    I'd really appreciate some help here, as the photo is dear to my heart but seems to have gone missing. It was originally scanned in but isn't showing up where all my scanned photos are saved. Eek!
    If anyone has any pointers on where I could find this photo in its original size, please do share them!
    Ta,
    posies

    Hi DonTimo,
    I've tried doing that, but in the said folder there are only default pictures. I can't find the images of any contacts in the app "Contacts" anywhere. The thread you refered me to and many others that are smilar to it, date back to about 2009-2010.
    Really need this photo.  Any other pointers?

  • How to find the existing function module is used in another function module

    Hi all,
    I created a function module and the same one is called from another function module.
    When I tried to find where the  first function module is used  using  Where-used List , I am getting the message "function module not found in selected areas" .
    Please  guide me what is other method to find whether the function module is used in another one.
    Thanks,
    Vengal Rao.

    hi,
    Go to UTILITIES-> Update Navigation index.
    or go to fucntion group and Generate the Funtion group once.
    it will detect all fucntion modules under that function group.
    regards,
    Rama

  • I have an issue with time machine, it doesn't find the Lacie external driver it use to use. it is the same drive that I usaly use for time machine back ups. It is corectly plugged. What can I do ?

    Hi,
    I'm trying to back up my macbook with time machine on the Lacie external driver I usualy use for this, but today my computer doesn't find the driver. I haven't done back up in 6 month.
    Today, the Lacie driver is pluged and running, but the computer just does'nt find it.
    what shall I do ?

    Some things to consider:
    Is the drive mounted, i.e., visible via Finder and/or on the Desktop?
    Is the drive still selected in System Preferences, Time Machine? If not, use the "Select Disk" button.
    Is Time Machine still turned on (System Preferences, Time Machine)?
    Can you see the drive (and mount it) using Disk Utility (in your Utilities folder)?
    charlie

Maybe you are looking for