Modal Form

Hi,
I have created a modal form using the code
" <link rel="stylesheet" href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/
redmond/jquery-ui.css" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script>
<script type="text/javascript">
$( function() {
$('#ModalForm1').dialog(
modal : true ,
autoOpen : false ,
buttons : {
Cancel : function() {
closeForm();
Add : function() {
addPerson();
function openForm()
$('#ModalForm1').dialog('open');
function closeForm()
$('#ModalForm1 input[type="text"]').val('');
$('#ModalForm1').dialog('close');
function addPerson()
var ajaxRequest = new htmldb_Get( null , &APP_ID. ,
'APPLICATION_PROCESS=addDepartment', 0);
ajaxRequest.add( 'P7_DEPT_ID', $v('P7_DEPT_ID'));
ajaxRequest.add( 'P7_DEPT_NAME', $v('P7_DEPT_NAME'));
ajaxRequest.add( 'P7_DEPT_ISSUE', $v('P7_DEPT_ISSUE'));
var gReturn = ajaxRequest.get();
if(gReturn)
{ alert(gReturn) }
else
{ ajaxRequest = null;
closeForm();
doSubmit('SEARCH'); }
</script>
Button: Template based button
action-Redirect to url
javascript:openForm();
Here i want to create an another modal form with another button on same page. I tried with the button attributes but it won't work.
so, how can i create an other modal form????

Tulasi 1243 wrote:
but i couldn't find how to use those plugins to create another modal form..As stated in the documentation (http://www.skillbuilders.com/download/download-resource.cfm/instructions.pdf?file=Oracle-Apex/plugins/modal_page//instructions.pdf), you can identify each Modal page with an identifier:
Modal Page ID
The Modal Page ID setting is used to associate an identifier, such as "create-customer-page", with the modal page that has been opened. When the modal page closes, this identifier will be passed back with the event object so that the closing of one modal page can be differentiated from another. The value can be accessed from the data object of "this" in a Dynamic Action with: this.data.modalPageId. If not all modal dialogs on a page have a Modal Page ID specified, you will first need to test if the modalPageId exists.
You should be able to open multiple modal pages.
Robert
http://apexjscss.blogspot.com

Similar Messages

  • Making a Form as Modal Form

    Dear All,
    Please let me know how can I make a form as Modal Form ?
    Regards,
    Noor hussain

    Hi Noor,
    I think there are two possible design.
    The modal form can be mobal for the application or for a parent form.
    If you want an application modal form, you simply need to test all the events coming from a form different from the modal one and interrupts the event coming from the other forms.
    In the ItemEvent Handler you can write:
    If Not (FormUID = "YourModalFormUID") Then
        oModalForm.Select() ' oModalForm contains the reference to your Modal Form
        BubbleEvent = False ' Interrupts the events chain
    End If
    In the code above, if an event comes from a different forms, simply select the modal form and interrups the events chain
    If you would make a form modal for a parent form, you simply need to test if the event comes from the parent form:
    If FormUID = "MyParentFormUID" Then
        oModalForm.Select()
        BubbleEvent = False
    End If
    Hope this helps
    Carmine
    Edited by: Carmine Cairo on Feb 19, 2010 5:20 PM

  • How to create modal Form in SBO 2007

    Is it still no way to create a modal SBO form
    I want to create SBO Form that pause the lines of code from runing until the form is closed
    Modal property of the SBO Form still ready only.
    Sincerely yours
    Riade Asleh

    > Or you can use threading to work.
    Indeed, unless I'm mistaken, one will have to. In a common GUI API, if you open a modal form on the event thread, thereby putting it in WAIT state, another event pump is set up. But that functionality isn't available in the SBO UI API AFAIK.
    To put it differently: if you open a form in an SBO event handler and enter the WAIT state, the whole SBO application won't react anymore.
    So the way to do it is this:
    <ul>
    <li>Create a new Thread and start it. Within that Thread ...</li>
    <li>Create your window. </li>
    <li>Register a FORM_UNLOAD (or FORM_CLOSE -- I don't remember which one is deprecated) listener for that form</li>
    <li>Create a locking Object. A simple <tt>new Object()</tt> will do</li>
    <li>Show the form, and then enter a WAIT state on the lock previously created. In VB, for instance, that would be written:
        SyncLock waitObj
            Monitor.Wait(waitObj)
        End SyncLock
    </li>
    <li>When the FORM_UNLOAD handler is called (hopefully because the form was closed), notify the lock. For instance, VB again:
        SyncLock waitObj
            Monitor.Pulse(waitObj)
        End SyncLock
    </li>
    </ul>
    Mind you you might run into some trouble, as SBO suffers multi-threading somewhat less than gladly in my experience.
    But it might be worth giving it a try -- it's a fairly simple operation, so it might work without too much or indeed any hassle.
    PS: that nobr ain't none of mine

  • Blob column inside a modal form

    How can i display a blob from the database inside a modal form.

    Hi,
    What is your APEX version?
    Have you already created form in modal window? How?
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Jquery modal form

    Hello,
    Based on this thread Re: Implement jQuery modal form I have created my jquery modal sample.
    It opens correctly when I select 'Create' or 'Edit' but does not update the value into the database table.
    Can one help me please?
    Thanks,
    Bhavin

    Hi,
    Have you created onDemand process to update the record in the database.
    Eg. make the Create code of the button similar to below
      'Create : function(){
          addRecord();
      } The create function addRecord()
    function addRecord()
       var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=myApplicationProcess' , 0);
       ajaxRequest.addParam( 'x01' , $('P1_ITEM1');
       ajaxRequest.addParam( 'x01' , $('P1_ITEM2');
       ajaxRequest.addParam( 'x01' , $('P1_ITEM3');
       ajaxResult = ajaxRequest.get();
    }Now create an ondemand process.. go to shared component .. click on application process and in process point select on demand the last option. now in the source enter the code to insert the record..
    declare
      item1 varchar2(100);
      item2 varchar2(100);
      item3 varchar2(100);
    begin
        item1 := wwv_flow.g_x01;
        item2 := wwv_flow.g_x02;
        item3 := wwv_flow.g_x03;
        insert into myTable values( item1 , item2 , item3);
        htp.prn('record successfully added');
    EXCEPTION
       when other
       htp.prn('Error adding record');
    end;Here is an example : http://apex.oracle.com/pls/apex/f?p=12060:3
    Regards,
    Shijesh

  • JQuery modal form - Open another page

    Hi ,
    I have implemented a Jquery modal form in my application.
    I have a region and in the header I have the following code :
    <div id="transaction" title="Update transaction details" > . This is basically a form region and has around 35 items.
    I call this through the Jquery function
    $("transaction").dialog('open'); This works well for me.
    Now I want to move these items to a different page.
    How can I call this page as a modal dialog form ?
    I would like to do :
    $(NEW_PAGE).dialog('open') // NEW PAGE can be an URL to the new page ?
    How I can achieve this functionality ?
    Thanks,
    Dippy

    create an html no template region:
    add a html frame into source
    <frame id ="eventreg" src="f?p=&APP_ID.:your application id:&APP_SESSION.::NO:your page id:your parametere:&your parameter value." height="100%" width="100%" frameborder="0"></iframe>
    region header section
    <div id="yourdivid">
    region footer section
    </div>
    page header add the javascript
    $(document).ready(function(){
    $("#eventRegUpd").dialog({bgiframe: true,
                               width: 775,
                                     height: 525, 
                                     autoOpen: false, 
                                     modal: true                                 });
    hope this will help you
    regards

  • No margin in WebDynPro modal forms

    Hi experts!
    I suppose this question already been answered somewhere but I coundn't find it.
    I don't get any left margins in the modal forms in WebDynpro applications. I think it looks really ugly. Should it be like this or can it be changed?
    Anyone that does understand what I mean and has an explanation to this layout behavior?
    Thanks in advance
    Fredrik

    Hi Fredrik,
    I saw the image. how are you creating the pop-up window ?Are you creating your own pop-up then calling l_window_manager->create_window_for_cmp_usage , if so then the view that constructed needs to be adjusted. Try giving WIDTH of the container ROOTUIELEMENTCONTAINER as 90%.
    if_wd_window reference where you recieve the constructed window has a method set_size however it doesnt seem to work,
    you can give it a TRY.
    Greetings
    Prashant

  • Modal Form between the Form Events

    I create a modal form which is like the message box but with a textbox in it. What i mean here is, the modal needs to hold the form event while it's adding an Sales Order record.
    I have tried the Modal Form method as shown in SDK Sample 12.ModalForm. However, i found the Sales Order is added before i click any button in the Modal Form.
    So, can anyone give me any advise how to work with it.......
    Thanks a lot~~

    Hi,
    Solution I would try is to catch FormItemEvent, EventType = et_ITEM_PRESSED, ItemUID = "1".
    With this you can catch the OK/Save button. If you use the BeforeAction you can even Cancel (bubbleEvent) adding the record if the user cancels your modal form.

  • Editing Data in modal form

    I have an mxml for my project, in which I have a DataGrid with a few fields, just enough to locate a desired record.  When I double click on the item in the DataGrid, a modal form pops up, populated with the data in all the fields of the same record.  So far, so good.  However, now when I try to edit any data in any field, I get an error message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at mx.containers::TabNavigator/keyDownHandler()[E:\dev\gumbo_beta2\frameworks\projects\frame work\src\mx\containers\TabNavigator.as:904]
    I don't have a keyDownHandler on my TabNavigator.
    My project is fairly small and a knowledgable person would probably be able to see my mistake in 10 seconds or less if they reviewed my code.  A zip file with my code is attached.
    If some one could take a look, and post the errorneous line in the reply... then everyone in the forum could benefit.
    I am making progress thanks to the excellent examples and instructions provided at:
    http://sujitreddyg.wordpress.com/flash-builder-4/
    I got a little demo of my own working just like in the instructions.  I had to rebuild my test project from scratch several times.. I think the FB 4 b 1 stuff was interfering with the FB 4 b2 way of doing things. However now, I am trying to build my test project in the way that my real project will work.. and that is... all detail forms will be opened in a modal window, edited, commited and then closed.

    PROBLEM:  MODAL "frmSBJ" FORM crashes when I try to edit the text in a TextInput.  (See exact error text in previous post)
    In the baa_ria.mxml: ------------------------------------------------------
        <fx:Script>
            <![CDATA[
                import components.*;
                import mx.managers.PopUpManager;
                protected function grdSBJs_itemDoubleClickHandler(event:ListEvent):void
                    show_frmSBJ();               
                public function show_frmSBJ():void
                    var pop:frmSBJ = frmSBJ(PopUpManager.createPopUp(this, frmSBJ, true));
                    pop.bAA_SBJ = grdSBJs.selectedItem as BAA_SBJ;
                    PopUpManager.centerPopUp(pop);                                          
    In the "components" folder, frmSBJ.mxml: ---------------------------------------------------------
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
                     xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/halo"
                     width="600" height="506"
                     xmlns:valueObjects="valueObjects.*"
                     xmlns:baa_data_svc="services.baa_data_svc.*">
        <s:layout>
            <s:BasicLayout/>
        </s:layout>
        <fx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.managers.PopUpManager;
                protected function btnDone_clickHandler(event:MouseEvent):void
                    // TODO: Refresh the grdSBJs somehow
                    PopUpManager.removePopUp(this);
                protected function btnCommit_clickHandler(event:MouseEvent):void
                    updt_SBJResult.token = baa_data_svc.updt_SBJ(bAA_SBJ);
            ]]>
        </fx:Script>
        <fx:Declarations>
            <valueObjects:BAA_SBJ id="bAA_SBJ"/>
            <mx:DateFormatter id="dfISO" formatString="YYYY-MM-DD"/>
            <mx:DateFormatter id="tfHMS" formatString="HH:MM:SS"/>
            <s:CallResponder id="updt_SBJResult"/>
            <baa_data_svc:Baa_data_svc id="baa_data_svc" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
        </fx:Declarations>
        <s:Panel x="15" y="9" width="564" height="465" id="pnlMain" title="Subject Name">
            <s:Group x="10" y="377" width="544" height="41" id="grpButtonBar">
                <s:Button x="309" y="10" label="Commit" id="btnCommit" click="btnCommit_clickHandler(event)" />
                <s:Button x="386" y="10" label="Undo" id="btnUndo"/>
                <s:Button x="464" y="10" label="Done" click="btnDone_clickHandler(event)" id="btnDone"/>
            </s:Group>
            <mx:TabNavigator x="6" y="8" width="548" height="361" id="tnvSBJ" creationPolicy="all">
                <s:NavigatorContent label="Properties" width="100%" height="100%" id="nvcProperties">
                    <mx:Form x="126" y="5">
                        <mx:FormItem label="SBJ_NM">
                            <s:TextInput id="sBJ_NMTextInput" text="@{bAA_SBJ.SBJ_NM}"/>
                        </mx:FormItem>
                        <mx:FormItem label="SBJ_DOB">
                            <mx:DateField id="sBJ_DOBDateField" selectedDate="@{bAA_SBJ.SBJ_DOB}"/>
                        </mx:FormItem>
                        <mx:FormItem label="SBJ_ID">
                            <s:TextInput id="sBJ_IDTextInput" text="@{bAA_SBJ.SBJ_ID}"/>
                        </mx:FormItem>
                        <mx:FormItem label="NOTE">
                            <s:TextArea id="nOTETextInput" text="@{bAA_SBJ.NOTE}"/>
                        </mx:FormItem>
                    </mx:Form>
                </s:NavigatorContent>
                <s:NavigatorContent label="Meta-data" width="100%" height="100%" id="nvcMetaData">
                    <mx:Form x="117" y="25">
                        <mx:FormItem label="SRC_SYS_NM">
                            <mx:Text id="sRC_SYS_NMText" text="{bAA_SBJ.SRC_SYS_NM}"/>                       
                        </mx:FormItem>
                        <mx:FormItem label="SRC_SYS_GUID">
                            <mx:Text id="sRC_SYS_GUIDText" text="{bAA_SBJ.SRC_SYS_GUID}"/>
                        </mx:FormItem>
                        <mx:FormItem label="OBJ_GUID">
                            <mx:Text id="oBJ_GUIDText" text="{bAA_SBJ.OBJ_GUID}"/>
                        </mx:FormItem>
                        <mx:FormItem label="CDT">
                            <mx:Text id="cDTText" text="{dfISO.format(bAA_SBJ.CDT)}"/>
                        </mx:FormItem>
                        <mx:FormItem label="CTM">
                            <mx:Text id="cTMText" text="{tfHMS.format(bAA_SBJ.CTM)}"/>
                        </mx:FormItem>
                        <mx:FormItem label="CBY">
                            <mx:Text id="cBYText" text="{bAA_SBJ.CBY}"/>
                        </mx:FormItem>
                        <mx:FormItem label="MDT">
                            <mx:Text id="mDTText" text="{dfISO.format(bAA_SBJ.MDT)}"/>
                        </mx:FormItem>
                        <mx:FormItem label="MTM">
                            <mx:Text id="mTMText" text="{tfHMS.format(bAA_SBJ.MTM)}"/>
                        </mx:FormItem>
                        <mx:FormItem label="MBY">
                            <mx:Text id="mBYText" text="{bAA_SBJ.MBY}"/>
                        </mx:FormItem>
                    </mx:Form>
                </s:NavigatorContent>
            </mx:TabNavigator>
        </s:Panel>       
    </s:Group>
    Thanks for your help pointing out where in this code I am going wrong.

  • Implement jQuery modal form

    Hi,
    For a long time I am trying to find anything related to implementation of modal popup windows into Apex and so far no luck.
    Here is a link:
    [http://jqueryui.com/demos/dialog/#modal-form]
    and that is close to whatever I want to get. I have a page with lots of items and buttons, by clicking on one of the buttons I want modal window to popup and value from Parent Page (stored in hiden item) passed to modal window. In modal window I want to enter some data and by clicking "submit" data will go to the table and window shold be closed after that. In the same time I need Parent Page to get just entered data from modal (or just simply be refreshed)............ so it is all just basic stuff of popups and modals.....but I can not get this working.
    Anyone has done it before? Any resuls?
    Thanks a lot

    Hi All,
    I have outlined the steps to achieve the modal form below ......
    Include the below in your page template header section :
    Latest Jquery JS , ui.core.js ,ui.dialog.js,
    ui.draggable.js,ui.resizable.js // optional
    (You can download these JS files from the Jquery website)
    1) Create a Region with the items you wish to see in the modal dialog form
    2) Place the following in the region header section
    <div id="dialog" title"Create New User"> 3)In the region footer add
    </div>Add the following Javascript in your page template :
    <script>
    $(document).ready(function(){
    $("#dialog").dialog({
    bgiframe: true,
    autoOpen: false,    // hides the window by default and you will use function $("#dialog").dialog('open'); to open it
    height: 300,
    modal: true
    </script>For the Create button to open the dialog, call a javascript fucntion :
    function f_show_dialog()
    $("#dialog").dialog('open');
    }For the Modal form Submit button which inserts a row :
    function f_insert_row()
    doSubmit('SUBMIT');
    Create a Pl/sql Process that executes with the condition
    Request=expression1 where expression1 is SUBMIT
    Include a branch to the same page for this SUBMIT button.
    Phew ! Hope this was helpful.I will try to put an example on OTN soon....
    Thanks,
    Dippy
    Edited by: Dippy on Feb 19, 2010 9:45 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Error message does't show at modal form

    Hi,
    Can anybody tell me when and where the error should be displayed when the form is a modal form.
    Please help me!
    Kind regards
    Edward de Ridder

    I replay to my own message because I did not find the problem but I have a workaround that maybe interest some of you.
    Copy the procedure DisplayServerQMSError from an early version of qmslib to qmslib65 qms$errors. Change than the call qms$trans_errors.Display_messages in the procedure unhandled_exception to DisplayServerQMSError and it works fine by me.
    Of course there are nicer ways to do this, please tell me if you know one.

  • Capture event in Modal form

    Hi Guys,
    How do we capture the event in "Do you want to save the changes" modal dialog?
    I can't see the FormType using debug information.
    I am using VB6 and 2004B. Help urgently needed. Thanks.

    Hi CK,
    That window is a standard message box and if I'm not mistaken the form type is 0 (zero), but this means that all messsage boxes are form type 0 and you have to build something very intelligent in there if you cannot solve the problem in another way.
    Hope it helps,
    Adele

  • Error Message "Form - Modal form is currently active"

    This error message appears when our Add-on is connecting and I have the Add-on Administration form open.  Are there any suggestions on what can be causing this error message and how to prevent the error message from appearing?

    > How do you start it?It is automatically started by
    > SAP Business One, when registered in Add-on
    > Administration.
    The SBO users will not install the addon themselves / won't be allowed to do it, right? (since the addon is assigned to a company by an admin, and probably started automatically/mandatory at SBO startup(?))
    Maybe the easiest solution would be to check if the addon was just installed (if the admin-form is open;) and ask the user for a restart of business one. Since it's only the administrator which will see this message, I personally could live with that.
    Anyway it probably has to do with your startup routine since my addon starts regularly when installed via the Addon Administration (form opened at addon start)...
    My Version: SBO 2004A PL 14

  • Create Sharepoint 2013/2010 Modal Forms for New Items, Multiple Lists

    I have a main page with 4 buttons. Each button is linked to a different list. My question is: how can I make it so that when a user clicks on a button, the new item form pops up? And then, once submitted, the new item form closes and the user is once again
    looking at just the mina page?
    I have seen many suggestions on the web for multiple buttons with one list, but not any for multiple buttons for multiple lists.
    I am relatively new to JQuery/coding, so if you have an answer please explain it in detail (think "Coding for Dummies," or some such format). I use a JQuery Doc. Library, and a Content Editor to reference to the specific JQuery I want to use.
    That is about as far as I have gotten on this.
    Any help would be greatly appreciated!

    Hi Cameron,
    I do have access to InfoPath. How would I do it through there? If it's easy and already designed within the program, I would much rather do that!
    As for the link you gave me - would you mind explaining it to me? I clicked on it and read the blog, but I'm confused on these things:
    1) How do I use the code to apply to 4 different lists, each attached to it's own button?
    2) I have the buttons already put on the page - how do I connect the code to said buttons?
    3) How would I make sure that each pop up closed upon form submission?
    I really appreciate your help! Thank you!

  • How to create a form and show it as a modal window?

    Hi!
    How can I create a form and display it as a modal window
    using VB.NET?
    Thanks
    Zoltan Sutto

    The sample 12 of the UI shows how to create a modal form.
    The idea is to add a small code in the sub  SBO_Application_MenuEvent and SBO_Application_ItemEvent
    you set the UID value of your form in a variable when you open it, then you can add this code after the two above sub
    If Not IsNothing(mst_MyModalUID) Then
       Dim dsa_Form As SAPbouiCOM.Form
       For Each dsa_Form In Me.SBO_Application.Forms
          If dsa_Form.UniqueID = mst_FormUIDSon Then
    'Form still available
             Me.SBO_Application.Forms.Item(mst_FormUIDSon).Select()
             BubbleEvent = False
             dsa_Form = Nothing
             Exit Sub
           End If
         Next
         dsa_Form = Nothing
    'Form closed, set the uid to nothing
         mst_MyModalUID= Nothing
    End If

Maybe you are looking for