Item not being saved when item is in a jquery modal  dialog

Hi all,
I followed instructions found here :
http://shijesh.wordpress.com/2010/04/10/jquery-modal-form-in-apex-4/
to create a jquery modal dialog, this is the code I added in html header :
<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() {
   $('#ModalForm').dialog(
        modal : true ,
        autoOpen : false ,
        width : 425,
        closeText : 'Close',
        stack : false,
        resizable : false,
        buttons  : {
            Cancel : function() {
                     closeForm();
            Save : function() {
                updateMEMOVELD();
function openForm()
    $('#ModalForm').dialog('open');
function closeForm()
    //$('#ModalForm input[type="textarea"]').val('');
    $('#ModalForm').dialog('close');
function updateMEMOVELD ()
   var get = new htmldb_Get(null, &APP_ID.,   
                    'APPLICATION_PROCESS=f_memo', 0);
   get.add('P9_MEMOVELD',$v('P9_MEMOVELD'));
   var gReturn= get.get();
   //alert(gReturn);
   //alert($v('P9_DATUM'));
  $s('P9_MEMOVELD',gReturn);
  alert($v('P9_MEMOVELD'));
  $s('P9_MEMOVELD_COPY',$v('P9_MEMOVELD')); 
  $('#ModalForm').dialog('close');
</script>my situation is a little different, my modal does not have to perform an sql update, just change a field
the user will then save in the main form
for some reason the field never gets updated in the db
I even created a on demand application process called f_memo :
BEGIN
  APEX_UTIL.SET_SESSION_STATE('P9_MEMOVELD',:P9_MEMOVELD);
  htp.p(:P9_MEMOVELD);
END;why is my field not send to the db ?
it works when I delete this from the region header :
< d i v id="ModalForm" title="Add Person" style=" d isplay:n one  "   >but then of course I no longer have a modal dialog
what's wrong ?
I put the code online at apex.oracle.com
workspace XONIXRS
login/password demo/demorun the application
click on lijst facturen (invoices) (in the right sidebar region)
then click on the zoeken (search) button
a report appears, click on edit on the first line (200900017)
now a form appears, click on the outright button memo
now the modal shows up, change the field and click on save
click on ok (for the alert) and then click on Save invoice
you will remain on the same page
now click on annuleren
and then click on edit on the first line (200900017) again
then click on memo again, you will see the memo has not been changed
how comes ?
Kr
Martin

The issue is that creating a modal of a region lifts that region from the HTML. Just have a look at the DOM when you run your page and not the source html, because that does not reflect changes to the dom made on page load. This means that your memo-field is removed from the FORM-tags, and effectively won't submit to session state. The item is not processed when you submit the page! You can track that through debugging your page. Memo is not saved and not processed.
Trying to save the value to session state is not enough, it doesn't really matter in this case. The moment you submit the page, the session state will get overwritten by the submitted values of the items.
So what i did:
<ul>
<li>move P9_MEMOVELD to region FACTUUR, together with all the other db fields</li>
<li>change the type to hidden</li>
<li>set value protected to NO</li>
<li>in the modal region create a new page item P9_MEMOVELD_POP, type textfield</li>
<li>set the source to always use a page item as source, with source P9_MEMOVELD</li>
<li>changed function updatememoveld:
function updateMEMOVELD ()
   var get = new htmldb_Get(null, &APP_ID.,   
                    'APPLICATION_PROCESS=f_memo', 0);
   get.add('P9_MEMOVELD',$v('P9_MEMOVELD'));
   var gReturn= get.get();
   //alert(gReturn);
   //alert($v('P9_DATUM'));
  $s('P9_MEMOVELD',gReturn);
  alert($v('P9_MEMOVELD'));
  $s('P9_MEMOVELD_COPY',$v('P9_MEMOVELD')); 
  $s('P9_MEMOVELD',$v('P9_MEMOVELD_POP'));
  $('#ModalForm').dialog('close');
}Whether you want or need the session state set is up to you, it depends on if you use this somewhere else dynamically on the page and thus would influence results there, but i don't think it will (it's a memo field...)</li>
</ul>
Extra remarks:
<ul>
<li>be careful with including jquery libraries! The standard libraries are included, yet you add previous versions too! (1.4.2) This might lead to issues...</li>
<li>use your templates better. Why would you wrap a region in div tags? Change or add a region template to be div tags. You can then easily assign a static id to this region, and target it. This will save you from wrapping wrapped wrappers (cause that is what the generated code looks like in the end).</li>
</ul>

Similar Messages

  • ALL OF MY FILES ARE NOT BEING SAVED WHEN I CLOSE FINAL CUT PRO X ?

    ALL OF MY FILES ARE NOT BEING SAVED WHEN I CLOSE FINAL CUT PRO X ?

    WHAT FILES AREN'T BEING SAVED? WHAT FILES ARE SAVED?

  • Settings are not being saved when i reboot

    i am having a problem when i restart my computer my settings such as dock settings background settings are not being saved how do i resolve this problem?

    Welcome to the Apple Discussions!
    Is this just for new settings that won't stick? Or have all your original settings reverted to the defaults? Have you started up from your Mac OS X install disk and used the Disk Utility to "repair disk"? Do you have a backup of your important files?
    -Doug

  • A window keeps appearing on my PC advising as follows "The iTunes library file cannot be saved.you do not have enough access privilages for this operation." resulting in recently purchased items not being saved to PC.

    A window keeps appearing stating " The iTunes Library cannot be saved. You do not have enough privilages for this operation". New purchases and CD down loads are able to be saved to my iPod but not to my PC?

    Read the part about changing permissions on the iTunes folder in: https://discussions.apple.com/message/11583914

  • Video Editing changes to inpoint and outpoint not being saved when exporting.

    I'm editing .mov 1080p video clips from my DSLR in Lightroom 4.4.  I,m using the slider bar to set a new "inpoint" and "outpoint," shortening the video.  When I export, I am using the original format and new file name.  Lightroom tells me the video is shorter in length, but when I play it back in Windows, the new file is the original length.  What am I failing to do/see here?  I'm using Win 7

    In my experience when you export in the original format (MOV) you lose all adjustments, including length shortemimg.
    Maybe someone can explain what the use is of this setting?
    The adjustments are only reflected when exporting as H.264 (MP4) and maybe DPX which I never have used.

  • Sent emails on my iphone not being saved on my hotmail's sent items

    Sent emails on my iphone are not being saved on my hotmail's sent items

    Delete the account on your phone under settings> Mail, contacts, calendars> hotmail account> delete. This will not erase anything on your email account as your phone only accesses the server. Then you can add the account again in the same place in settings. Just make sure you have the password so you can add it right away. Sometimes people forget their password because they never use it. If that's the case you can go online and click "forgot password" and resset it before you uninstall it on your phone. Hope this helps.

  • I am having a persistent problems with the application tabs i pin not being saved. sometimes, they are not present when i re-open the browser.

    i have 3 sites i have repeatedly saved as an app tab. on the rare occasions i exit my browser, my pinned tabs are missing. furthermore, when i attempt to "restore previous session", the tabs that were open may be restored but the pinned tabs are ALWAYS missing and never restored.

    ''app-tabs not being saved...'''
    Be sure you close Firefox properly File (or "Firefox") > Exit not with the "x" in the upper right corner.
    Just because app-tabs will carry over from one session to another does not mean that they are fool proof or should be relied on., I keep mine in a bookmarks folder and replenish app-tabs from there when needed. It is also nice to have the "Tab Handler" to work with tabs and change all or a selection of tabs to app-tabs at once.

  • My Notes from iPhone are not being saved to Notes in Outlook when I sync.  How can i get Notes to back up in Outlook?

    My Notes from iPhone are not being saved to Notes in Outlook when i sync.  How can I get Notes to back up in Outlook?

    I have iPhone 4S

  • [svn:osmf:] 14871: Fixing anchoring 'right' and 'bottom' properties not being applied on items that don't have a width/ height and position set.

    Revision: 14871
    Revision: 14871
    Author:   [email protected]
    Date:     2010-03-19 01:05:54 -0700 (Fri, 19 Mar 2010)
    Log Message:
    Fixing anchoring 'right' and 'bottom' properties not being applied on items that don't have a width/height and position set.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/layout/LayoutRenderer.as

    If you're just doing it in a back and forth or spiral fashion, you don't need to check whether a square's been filled in. You just go from a start point to an end point. Those points and the squares in between are determined by simple arithmetic.
    If you're doing it randomly, I wouldn't use the GUI elements themselves. I'd have, for example, and array of booleans that tells whether each square has been filled in.

  • Table extension not being saved

    Hi,
    I have implemented Table extension at item level for SC and from the config perspective all looks fine.
    1) Created Append struture with required fields
    First step: appending the field to the correct structure in SE11 or via transaction SPRO.
    Structure names for table extensions are according to the pattern:
    INCL_EEW_PD_<x>_CST_<y> with
    <x>: HEADER, ITEM
    2)
    Path in IMG (transaction SPRO):
    SAP SRM -> SRM server ->
    -> Cross-Application Basic Settings
    -> Extensions and Field Control (Personalization)
    -> Create Table Extensions and Supply with Data
    -> Define Customer Table Extensions on Item Level
    Second step: you additionally need to append the new table extension field to the
    corresponding INCL_EEW_PD_<x>_CST structure called u2018cross-documentu2019 structure. This can
    also be done in IMG
    You can explicitly enter the very same field(s) (name and type) into both append structures.
    It is recommended, however, to first create another structure with the new field (in SE11) and
    then include that other structure in both append structures
    (menu path in SE11 screen: -> Edit -> Include -> Insert).
    Default append structure names in this example are
    ZAINCL_EEW_PD_ITEM_CST_SC and
    ZAINCL_EEW_PD_ITEM_CST
    when using the IMG path..
    3)
    Third step: Set visibility of the table extension.Create an entry with TICUS for item data (THCUS for header data).
    Donu2019t miss to populate the Transaction Type field - you could save the table entry without it,
    but it will not work!
    4)
    Fourth step: Configure Control of Fields of Table Extensions. Create an entry with TICUS for item data (THCUS for header data).Donu2019t miss to populate the Set Level field - you could save the table entry without it, but it will not work!
    Fifth step: Configure Control of Actions
    Sixth (final) step: SM30 - maintain view /SAPSRM/V_MDFSBC_DEFAULT
    I have rechecked the config several times but could not find any reason for the data not to be saved.
    When I add the data to the table structure and if click enter or check button the data disappears. The entries are not captured in BBP_PDICF  table either. i can see the Z structure in se11 for BBP_PDICF.
    I have checked doc_change badi for any issues but could not find the issue. Any idea as where I should check for the data not being saved issue?

    Hello Srinivas,
    Please do this step:
    In SM30-maintain view /SAPSRM/V_MDFSBC_DEFAULT
    Object set type :TICUS
    Structure field name : custom field
    Object type : BUS2121
    set level : item
    Field visible : X
    field enable : X
    Regards,
    Neelima

  • GR of Delivery completed item not possible for line item of PO/SA ?

    Hi,
    Am unable to Receive Goods in MIGO an Error - "GR of delivery completed item not possible for line item of PO/SA"?
    Regards
    Mohammed Khaja Pasha
    +919550917395.

    Hi Mohammed Khaja Pasha ;
    Delivery Completed checkbox provides a lot of fonctionality like an additional delivery is not expected, but is possible. If you prevent posting of migo , you can benefit from system messages M7 163 and 254.
    You want to ensure that the delivery is made before the planned delivery date : Set message 254.
    You want to ensure last possible delivery date : Set message 163.
    However ;
    The open PO quantity of the PO item equals zero.
    The PO item is no longer relevant for materials planning.
    The PO item is ignored when letters urging delivery of overdue goods are generated.
    The PO item can be deleted and archived.
    You can specify whether the Delivery Completed checkbox is to be selected automatically.
    Regards.
    M.Ozgur Unal

  • Messages are not being saved on N96

    On my N96 I have set save sent messages and receive report as 'yes' but after updating firmware (20.050) messages are not being saved.Is there any solution to someone.

    I have exactly the same problem with my N95 but I can't really say when it started. Suddenly I just noticed my phone didn't save sent messages anymore and hadn't done it for some time, but can't really tell after what it started to occur. Really strange problem, not even reseting back to factory settings helped - after I put "receive report" option back it stops saving sent messages to sent folder. Actually if I go to "sent" folder quickly after sending the sms, it shows there for little moment before disappears. Really strange. I couldn't google any other information about this problem than this topic.

  • File Options not being saved

    I appologize if this is the wrong forum, but I did a search and failed to find a related subject.
    When I click on File>Options then modify them the way I want to, then close Designer 2008 and reopen it, they're back to the default values.
    How can I retain my options even after closing designer and reopenning?
    Thanks much!

    What version of Crystal are you using?
    Are you a local PC Administrator also?
    Try right clicking on the crw32.exe and selecting Run As Administrator and then change them.
    Are you clicking the OK or Save button after making changes or simply closing the window using top right X button?
    Those options are saved to the registry, only reason they are not being saved is you don't have permission or some anti-virus software or Restore Point is writing the original settings back when you close CR.
    You may want to check with your IT people to see if they have pushed out some sort our Profile update that doesn't allow you to keep changes to the registry.
    After making the changes and you create a new report do you see the changes? Don't close the designer.
    Thank you
    Don
    Edited by: Don Williams on Apr 6, 2011 12:52 PM

  • Window preferences not being saved

    Hi there -
    Using InDesign CS4 on Windows XP.  A few days ago a problem started happening - whenever I close InDesign, my preferences for which windows (Tools, Pages, Links, Character) I have open are not being saved.  Takes me 3-4 minutes every time i open InDesign to put everything back the way it should be.
    I've installed updates, no dice, and have deleted the preferences file as suggested by this thread:http://forums.adobe.com/thread/526990
    Any other steps I can take?
    thanks in advance,
    Andrew

    Those things are saved as part of the workspace. It sounds as if the current workspace file has become corrupt. Close ID, then go to your user profile and you'll find the workspaces folder under \Application Data\Adobe\InDesign\Version 6.0\<language>\Workspaces. Delete the "current" xml file for the workspace and restart ID. The workspace will be restored to the conditions set when it was saved, but hopefully will remember changes again when you close the program.

  • Notes are not being Saved

    Recently upgraded to an iPhone 3G S from the first generation iPhone. Synced my phone and everything is fine, but when I use the Notes application the notes are not being saved. Anyone know of a way to fix this?

    Ensure that the "sync notes" box is checked in iTunes. Also note that the notes syncing feature doesn't work very well yet.
    If you have a note on both the phone and the computer, and you change/update the one on the phone, the next time you sync the computer version will over write the phone version.
    coop

Maybe you are looking for

  • Connect OEPE to a Weblogic Server running in Production SSL mode

    I am trying to connect an ECLIPSE IDE to a production Weblogic Server domain. However when I add the AdminServer to the IDE I get the message that it is Stopped but Synchronized. Therefore I cannot deploy any code directly from the IDE. How do you ge

  • M-Audio Interfaces

    I'm new to Mac's, but not digital recording with PC's. I have the M-Audio Delta 1010 which is useless to carry over to the MacBook. The 1010 may even be useless to carry over to MacPro since 'I think' there may be a PCI conflict via the Mac Pro PCIe

  • All purchased films - Removed

    i don't know who decided to start tinkering around with the interface but removing the "all" purchased tab was a terrible idea. The movie layout is already bad but now it's worse. I honestly don't know what movies are supposed to be in what genre. I

  • UTL_FILE help/samples

    Hello Folks, I need to write a routine to read in a CSV file parse it and inser the data into a table. Does anybody have examples? TIA

  • How Do I Activate a Previous and a Next (NOT History) Navigation Image/Button?

    RoboHelp 10, using Multiscreen HTML5 layout; Desktop Layout: All of my searches result in the same answers, which tell me to insert javascript:history.go(-1) and javascript:history.go(1) into the Link to field of the Hyperlink Properties dialog for m