This discussion is archived
7 Replies Latest reply: Aug 1, 2013 12:21 PM by MannyRod RSS

Modal Sizing in 4.2

MannyRod Newbie
Currently Being Moderated

I've seen several threads about Skillbuilders version of the modal.   I'm assuming that prior to 4.2, there were no Modals?  


This is my first use of a modal and i'm starting with 4.2 and have not seen Skillbuilders version.

My problem is size.  I want to put 8 columns in there and it won't resize.  I don't see any options to auto size or any global setting.

How do i get it to resize automatically or even manually?

  • 1. Re: Modal Sizing in 4.2
    AlastairM Newbie
    Currently Being Moderated

    The skillbuilders modal plugin has been around for several years - there was definately a version before 4.2 - why do you ask?

     

    Assuming you are using the Skillbuilders plugin, you would set the size of the modal in the dynamic action that you create to display the modal.

     

    For example, create a DA on your page with the following:

     

    Event: Click

    Selection Type: Button

    Button: <Pick one of your buttons you have previously created on the page>

    Condition: No condition

    Action: Skillbuilders Modal Page (2.0.0). [Plug-in]

     

    Then in the settings you will see a Dialog Height/Width Mode. This can be set to Auto, Static by percent of window, Static by pixels.

     

    The auto option does not work so well in IE7 (or later versions of IE if running in compatibility view).

     

    Does that answer your question?

  • 2. Re: Modal Sizing in 4.2
    AlastairM Newbie
    Currently Being Moderated

    What do you mean by 'standard 4.2 modal'?

     

    There is no modal page functionality in Apex as far as I know which is why most people use the skillbuilders plugin.

     

    I'm starting to think I missed a trick here - unless you just mean standard jquery modal?

  • 3. Re: Modal Sizing in 4.2
    MannyRod Newbie
    Currently Being Moderated

    I'm talking about the built in modal featured in this sample app where you simply set your region template to 'modal region'

     

    https://apex.oracle.com/pls/apex/f?p=35050:2

     

    I deleted my own above solution, only the scrollbar showed up.  I still cann't resize this region.

  • 4. Re: Modal Sizing in 4.2
    AlastairM Newbie
    Currently Being Moderated

    Right - these are simple jquery modals. In which case what you suggested with the div is probably the best approach to setting the size.

     

    You'll have to set the question as answered yourself since its your question.

  • 5. Re: Modal Sizing in 4.2
    MannyRod Newbie
    Currently Being Moderated

    The jQuery modals require calling jQuery dialogs which are customizable.  But i can't figure out how to call it from a tabular form link.  Seems you need to call it via dynamic action.   What i'm using is the 'custom modal' which requires no coding.   That is what i'm trying to resize and can't seem to. 

  • 6. Re: Modal Sizing in 4.2
    AlastairM Newbie
    Currently Being Moderated

    In the example app you linked to above, the edit buttons in the table do something like:

     

    javascript:$s('P2_ID','301489902597450419033087171677750328176');openModal('editDept');"

     

    You can add in a jQuery .width to set the width of the div as follows:

     

    javascript:$s('P2_ID','301489902597450419033087171677750328176');$('#editDept').width(1000);openModal('editDept');"

     

    This worked when I edited the page using the Chrome developer tools so I assume it will work for you.

  • 7. Re: Modal Sizing in 4.2
    MannyRod Newbie
    Currently Being Moderated

    My manager who know javascript pretty well, had the answer.

     

    javascript:openModal('addDept',{width:800});

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points