How to hide the Media type field if no video is uploaded in paglayout

Hi,
I am creating a custom page layout with custom content type through visual studio 2010 for sharepoint 2010.
i need to create a field which supports to upload a video file.
so i created a site column and added it to my content type and added to my page layout.
<Field ID="{7F5AE2F9-C1A2-4BFD-876C-56ECFB7B0210}" Name="Video" DisplayName="Article Video" Type="MediaFieldType"  Group="Article Layout Columns" />
<FieldRef ID="{7F5AE2F9-C1A2-4BFD-876C-56ECFB7B0210}" Name="Video"/>
In my page layout i added the field in both edit and display mode as
   <PublishingWebControls:MediaFieldControl ID="MediaFieldControl1" FieldName="Article Video" runat="server"/>
All is well the video is displayed and i can add video.
My req is i need to show the video div in display mode only if video is added else it should be hidden in display mode.
how to do that?
Aruna

Hi,
According to your post, my understanding is that you want to hide the Media type field if no video uploaded.
After the video uploaded, the HTML of the Media Type Field will be changed. We can use jQuery to detect the change and hide/show it.
The following script for your reference:
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
if($("selector")==""){
$("divID").hide();
</script>
More information:
http://msdn.microsoft.com/en-us/library/gg699337(v=vs.85).aspx
https://api.jquery.com/hide/
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support

Similar Messages

  • How to hide the select-options fields on radiobutton select in webdynpro

    hi
    Could you please help how to hide the select-option fields in webdynpro
    there are four radio buttons
    for every radiobutton there is corresponding the select_option filed is associated to it
    user as only provision select  one radio button and reset of the select-option fileds should be hidden
    which ever the radio button is selected corresponding the select-options fileld should be displayed
    please find the attachement below

    Hi Nine,
    To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
    Sample code :
    Write the below code in the Event handler of Radio Button.
    DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
    lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
    This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
    Regards,
    Ravikiran.k

  • How to create the sub type field in hr abap infotype

    hi ,
        how to create the sub type field in hr abap infotype.
    regards,
    venkat.

    Try like this also
    creating of infotype please follow these steps ...
    Step 1: Create Infotypes
    i. Goto Transaction PM01 – To create Infotypes:
    ii. Enter the Infotype Number and say create all.
    iii. The following message would display:
    i. PSnnnn Does not exist. How do you want to proceed?
    iv. Click
    v. A maintain Structure screen appears.
    Fill in the short text description and the PS structure of the Infotype.
    Since the fields Personnel No, Employee Begin Date, End Date, Sequential Number,Date of Last Change, Name of user who changed the object are available in the PAKEY and PSHD1 structure, define the PSnnnn structure with only the fields you required.
    vi. Once the PS Structure is created, save and activate the structure.
    vii. In the initial screen of PM01, now click on .
    Create a new entry for the infotype.
    Fill in the values as mentioned below and save.
    Infotype Characteristics:
    Infotype Name of the infotype_ Short Text: __Short Description________
    *General Attributes :
    Time constraint = 1
    Check Subtype Obligatory
    Display and Selection:
    Select w/ start = 3 “Valid record for entered data
    Select w/ end = 5 “Records with valid dates within the period entered
    Select w/o date = 6 “Read all records
    Screen header = 02 “Header ID
    Create w/o end = 1 “Default value is 31.12.9999
    Technical Data:
    Single screen = 2000
    List screen = 3000; List Entry Checked.
    viii. In the initial screen of PM01, now click on .
    Choose the infotype entry in the list.
    Fill in the values as mentioned below and save.
    Technical Attributes:
    In tab section,
    The following attribute values are given:
    Applicant DB Tab = PAnnnn “Infotype Name
    Subtype field = SUBTY
    Subtype table = T591A
    Subty.text tab. = T591S
    Time cnstr.tab. = T591A
    Prim. /Sec. = I Infotype
    Period/key date = I Interval
    and .
    ix. Infotype Screen Modification:
    Edit Screen 2000 from PM01 for the Infotype.
    ABAP Editor for the Infotype Program MPnnnn00 will be displayed.
    Click . Flow Logic will be displayed. There string coding of your own logic.
    Regards
    Pavan

  • How to identify the media type 32 or 64 bit from installed oracle client

    hi guys,
    I have oracle client 11g r2 installed in my machine which is a AIX. but not sure of the media type. 32 or 64 bit. this information is required further to proceed in my further application compatability.
    tilll the previous release there was many hints like.. lib and lib32 in various locations. but not in 11g r2 i guess.
    can someone please help me to find out this piece of information..
    thanks in advance.
    rgds
    Shravee

    908038 wrote:
    hi karthick,
    thanks for replying. first of all i would like to say that I was not able to find the path which you have mentioned below.
    but i understood your intentions.
    so directly looked for a executable file of sqlplus underr oraclehome/bin. and i got few error messages, saying sqlplus could not be loaded. this could be because my 10g is currently configured. and not 11g as we dont want to disturb the environment without confirmation.You said this was AIX. So when you log on to the server, your "environment" only exists for that session you have created to log on. Set ORACLE_HOME to point to your 11.2 installation, and set PATH to point to $ORACLE_HOME/bin. Those settings are only good for that session, so will not impact anything else.
    If sqlplus reports 64 bit, well, that's obviously 64 bit. If it's 32-bit, it won't say anything about it, so "not 64 bit" must be 32-bit.
    >
    however, i tried to execute the same file for 10 g to check if 10g gives any info, but only got the version not 32 or 64 bit.
    rgds.
    Shravee

  • How to hide the Condition types in item condition screen in Sales Order ?

    Hi Experts,
    We got new requirement from the Client. Pricing Condition types  are ZZBG, ZPBG, ZPBA, ZFSG, ZBDG and ZBHG part in Pricing Procedure. These condition types have Condition records. These need to be hidden in Item conditions screen in Sales Order but other status of the conditions remain unchanged. Pleas provide me the solution earliest  How this we can achieve in a best way.
    Best Regards,
    Srikith

    Hi Srikanth,
    You can achieve this using CONDITION EXCLUSION.
    Maintain Condition exclusion for first condition type its Exclude the condition types which are below to that.
    You must set a condition exclusion indicator for the price. You can do this in two ways:
    If you want to set the condition exclusion indicator a follows then you specify it:
    1..for all condition records of a condition type (e.g. with condition type PR00) when defining a condition type in SD Customizing
    2.for an individual condition record (e.g. only for material 4711) in the detail screen of a condition record (in the Condition exclusion field)
    Hope this will helps you
    Dasaradha

  • How to access the table type field in the structure

    Hi All,
    I have a BADI CRM_MKT_ADR_SEARCH and a method CHANGE_SEARCH_RESULTS in this method I have a parameter CT_BP_CP_CHANNEL .This parameter has type CRMT_BP_CP_CHANNEL_TAB(this is table type) this has the line type CRMT_BP_CP_CHANNEL(this is structure) in this line type we have one field addrnumber.How to access this field in my method?Please help me in this regard.

    data lw_tab type CRMT_BP_CP_CHANNEL.
    loop at CRMT_BP_CP_CHANNEL_TAB into lw_tab.
       lv_field = lw_tab-addrnumber.
       <further processing>
    endloop.

  • How to export the media player for imported .flv video to stage ?

    Hi,
    I wonder if I can export the media player ( to the .SWF) without making my own using action script and buttons ....
    When I hit Ctrl/Enter I get a very good player along with video but when I export the player is gone (only video is there).
    There must be a setting for this I hope ?
    I'm using flash / xml too for thsi web site.
    thanks!

    resize both the Stage and the FLV component to the
    appropriate size.

  • To find the date type fields in the row and validate those date fields

    TYPES : BEGIN OF TY_MARA,
              MATNR TYPE MARA-MATNR,
              ERSDA TYPE MARA-ERSDA,
              ERNAM TYPE MARA-ERNAM,
              LAEDA TYPE MARA-LAEDA,
              MTART TYPE MARA-MTART,
            END OF TY_MARA.
    DATA : it_mara TYPE STANDARD TABLE OF ty_mara,
          it_mara1 TYPE STANDARD TABLE OF ty_mara,
           wa_mara TYPE ty_mara.
    loop at it_mara into wa_mara.
      describe field wa_mara-ersda type c_data.
    if c_data eq 'D'.
      CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
        EXPORTING
          date                            = wa_mara-ersda
       EXCEPTIONS
         PLAUSIBILITY_CHECK_FAILED       = 1
         OTHERS                          = 2
      IF sy-subrc eq 0.
    wa_mara-ersda = '00000000'.
        append wa_mara to it_mara1.
        write :wa_mara-matnr,wa_mara-ersda.
        else.
            wa_mara-ersda = '00000000'.
        append wa_mara to it_mara1.
        write :wa_mara-matnr,wa_mara-ersda.
      ENDIF.
      endif.
      endloop.
    This issue regarding how to find the date type fields in the row and validate those date fields.If its not a valid date ,i have to assign initial value to that.
    I've tried that for single field using describe field.Please help me do that for all fields.

    Hi Sam,
     I believe we had discussed the same issue in the below thread. Can you please refer the below one?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d93e16ff-c123-4b36-b60b-60ccd34f6ca7/calculate-time-differences-in-infopath?forum=sharepointcustomizationprevious
    If it's not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Question on how to Hide the User Name, Password, and Domain fields in the MDT Wizard

    MDT 2012 U1
    Deploying Windows 7 via Offline Media (ISO) to MS Virtual PC's
    I am looking on how to Hide the User Name, Password, and Domain fields which are prepopulated in the MDT wizard via the CS.ini (Not so concerned about the Domain field as I am User Name and Password)
    We do need the Computer Name and OU fields to be seen, so skipping the wizard is not a option
    The client just does not want these fields to be seen by the end users, they dont want them to even know the account name used for adding the machine to the domain, of course the password is not displayed but it must not be displayed either.
    But since we use the fields they must still  be fuctional just not seen.
    Thanks.....
    If this post is helpful please click "Mark for answer", thanks! Kind regards

    You shouldn't have to edit DeployWiz_Definition_ENU.xml. You should only need to add "SkipAdminPassword=YES" to the CS.ini file and your authentication information.
    Example:
    [Settings]
    Priority=Default
    Properties=MyCustomProperty
    [Default]
    OSInstall=Y
    SkipCapture=NO
    SkipAdminPassword=YES
    UserID=<MyUserID>
    UserPassword=<MyPassword>
    UserDomain=<MyDomain.com>
    SkipProductKey=NO
    SkipComputerBackup=YES
    SkipBitLocker=NO
    -Nick O.
    Nick,
    SkipAdminPassword=YES is for:
    You can skip the Administrator Password wizard page by using this property in the
    customsettings.ini.
    I am hidding the Username/Password/and domain field in the computer name Wizard pane which is read from the cs.iniDomainAdmin=xxxxx
    DomainAdminPassword=xxxxx
    DomainAdminDomain=xxxxxx
    JoinDomain=xxxxxx
    If this post is helpful please click "Mark for answer", thanks! Kind regards

  • How to hide the field from the view in the webdynpro application?

    Hi Gurus,
    I got a requirement where in which ,default layout has the field name Time.......To......... which is (2 input box ) and one lable assigned to the container.........
    Now my requirement is to hide this field from the layout for all cases of leave......(all types of leave)....
    I got a few inputs from forum that we can achieve this by implementing the following steps..........
    Create In context => Value attribute => Say Visibility
    Go to its properties
    Select com.sap.ide.webdynpro.uielementdefinitions.Visibility
    In View Layout
    Select UI Element Set Visible property to this context variable Visibility.
    In wdDoModifyView() You can set this property to false
    wdContext.currentContextElement().setVisibility(false);
    Can you people tell me where to create the value attribute........
    In the view context or in the component context...........
    and field that am talking about is assign to the container you want me to assign this context variable property to all ......Like to input box ,label and the container..........
    Please calrify this ASAP...........
    Thanks in Advance,
    Dharani

    Hi Manoj......
    Hi Murutuza,
    As per your guidelines I have created the value attribute in View context (which has the field..... which needs to be hide)inside the value node say FieldVisibility.......and attribute name OldTimeDuration......and I set this value with uidefeneitions Visibility .......
    and I bind this vaule with the field property visible(Time.......To..........)which I need to hide...........
    Now in the view implementation tab ..........I have coded in the doinit method(since my requirement to hide the field from the layout in all cases).........
    wdContext.currentFieldVisibilityElement().setOldTimeDuration(WDVisibility.NONE);
    But if I deploy the application and see still am getting the same field dispalying in the screen.........
    I even tried putting this code in wdmodifyview method.........same results........
    Kindly tell me how to hide the field permenantly from the screen............(without any conditions.)
    Thanks in Advance,
    Dharani

  • How to Hide the Parameter field at run time....

    Hi,
    I have a parameter field which behaves differently depending on the User logged in.
    It has the LOV coming from following SQL.
    SELECT customer_name FROM Cust_mast;
    If the user = 'INTERNAL' then the Where clause will be
    WHERE cust_id in('DELL', 'SBC', 'BANK')
    Else there will be no WHERE clause or the parameter field
    should be hidden in the parameter form.
    So my questions are:
    1) How to hide the Parameter field during Run time?
    OR OR OR
    2) How to change the LOV select statement during Run time?
    Thanks.
    Ram.

    Hi Ram,
    Is there any way to play with the sql query SELECT using DECODE ?I'm not sure of this part, maybe someone else can suggest a way.
    However, what you want can be done in 2 other ways:
    1. Build 2 reports. Both reports will just be duplicates of each other, only difference being that the 'LoV where clause' will be different. Now you can fire the appropriate report in many ways. For example, if the customer is alreay logged inside your custom application, and therefore you already know whether the user is internal of external, you can design your button or link which launches the report to contain logic such that one of the 2 reports is fired depending on who the user is.
    1. Use a JSP parameter form, not a paper parameter form In this case, just build an HTML parameter form in the web source of your report. Use Java logic to populate the LoV drop-down list. When you have to launch the final report, just launch the paper-layout of the report. For example (you will have to modify this):
    <form action="http://machine:port/reports/rwservlet?report=ParamForm.jsp+..." name="First" method="post">
    <select name="selected_customer" onChange="First.submit()" >
    <option value="">Choose a Customer Name
    <rw:foreach id="G_cust_id" src="G_cust_id">
         <rw:getValue id="myCustId" src="CUSTOMER_ID"/>
    <rw:getValue id="myCustName" src="CUSTOMER_NAME"/>
    <option value="<%=myCustId%>"><%=myCustName%>
    </rw:foreach>
    </select>
    </form>
    In the code above, you will have to make sure that your report's data model defines 2 CUSTOMER_ID's (like CUSTOMER_ID_INT and CUSTOMER_ID_EXT). These 2 will be internal and external Cust ID's. Use Java logic to show one of them.
    Navneet.

  • How to hide the Parameter field during Run time?

    Hi,
    How to hide the Parameter field during Run time?
    I have a parameter field which behaves differently depending on the User logged in.
    I am using reports 10G
    For ex: I have 3 field created in JSP
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user = 'SUPER show all the parameter
    CUSTOMER
    PROVIDER
    FROM DATE
    END DATE
    If the user is 'GATEKEEPER" Just show
    PROVIDER
    FROM DATE
    END DATE
    Can I do that?
    Please help
    Thanks.
    KK

    hi, i'm not familiar much with JSP. but i think workaround is to create two window one which have 4 fields and the other which have 3. if user is SUPER then call the first screen otherwise if user is GATEKEEPER then call the second screen.

  • How do i change the media type on a digital booklet when they option bar is greyed out?

    I downloaded an album a couple days ago which came with a digital booklet. I am trying to put it on my phone but need to change the media type to book to be able to do this. whenever I go to the get info tab, the options tab is completely greyed out and wont let me do anything to it. I have tried selecting read only on the file and it did not work. I have windows 8. If there's is any different way of getting this on my phone, anything would be great!

    The item must not be read only if you want to change it.
    In the new Get Info dialog the Media Kind is in a light grey. Next to that will be the word Music. Hover over it and you should see that it is part of a drop down list control, click and select Book.
    tt2

  • How do you change the media type for purchased movies & TV shows?

    I have purchased many movies from iTunes, and would like to organize them a bit better. For example...I would like to classify all of the standup comedy videos I've purchased as TV Shows, with the season title of "Standup" so I can go to one place in iTunes (under TV shows) to find all of my standup comedy.
    I do the following:
    - Get Info on the movie.
    - Navigate to the Options Tab.
    - The Media Kind drop down (where you would change the media kind from Movie to TV Show) is grayed out.
    This is true for all media I've purchased from iTunes.
    If I have ripped a DVD myself, I can freely edit the media type.
    Things I have tried:
    - Checked the permissions for my iTunes folder (all levels). It is set to read/write.
    - I have tried fiddling with the command line "chmod" command for a movie file. I believe I changed the permissions to "700" which (as near as I can tell) should change the permissions so that I can edit things.
    Neither of these things worked.
    Any other things I should try? Any help is appreciated.
    Thanks.
    -Carl

    The files aren't locked in Get Info in Finder?

  • I couldn't delete this video after I changed the media type. After I manually went in, it's become really strange. How could I get rid of it for good?

    I changed the media kind of a music video on my ipod to a podcast. Suddenly, I couldn't find it listed... It was still on my ipod, but wasn't on the music or podcast lists on itunes. I eventually got into my ipod, found the hidden folder it was in, and deleted it. It's still there in the podcasts section, though, except now it won't even play when I try and play it. I'd be really thrilled if someone could offer me some advice on what to do here, thanks..

    Hi wrtlinksys-user, you can try to do a funny reset on the router. To do it, just press and hold the reset button on the device for 30 seconds and when you reach 20 seconds while counting, simply unplug and replug the power adapter of the router. Update us if this will help you.

Maybe you are looking for