Dynamically set y axis (position) with javascript

Hello
I wonder if it is possible with javascript to set a y position of flowed subform in non interactive adobe form?
For example: For a certain subform  which is inclued in (flowed) main I want to be shown at certain vertical (y) position but only in the last page at bottom of main.
Last page I can find with
if(xfa.layout.page(this) == xfa.layout.pageCount())
but when changing
this.y = "100 mm"
it doesn't changes subform position.
I also tried with this.y = "100in", but result is the same.
Does anybody now a solution?

It's not a field, it's a complete subform with a table and some texts fields, which I want to show only in last page.
I tried changing subform to a positioned already before and changing it's y axis in javascript (tried in all events) doesn't work.
Could it be that syntax posted in first post isn't correct?
In that case (positioned subform) I have blank space on all pages but last one. For example, if a complete layout of a page is 100%, main 70% and subform 30%, I get 30% of blank space on all pages before last one, which I would like to avoid, so that main would be 100% in every page but last one and in the last one main should be only 70% and subform 30%.

Similar Messages

  • Dynamicly set y axis on graph with 0 always being in center

    i have a report that i want to dynamicly set the y axis as the values change from contract to contract. but i want to maintain that 0 will always be in the center of the graph.
    if i use the auto range and auto scale it shifts 0 away from the center.
    any ideas?

    Don't use auto range?
    Sorry, I don't mean to be a smart-alec, but Crystal's charts are not very flexable. I understand they are working on it.
    Debi

  • Set values in ListBox with Javascript.

    Hello.
    I have a ListBox that can have multiple values (you can set this in Designer 7.1 by the way). I want to select 1, 2, x, values in this ListBox by script in Javascript. I can read these values like this:
    var a = xfa.resolveNode ("ListBox1.value").nodes;
    xfa.host.messageBox (a.item(0).value);
    But how can I set the values?
    Another question: Is it possible to get these values as an array or do I have to parse the value above to get the values?
    /Per

    DropDownList2.clearItems(); <br />DropDownList2.rawValue =""; <br />//Add the new ones with an indexed boundItem <br />var myIndex = this.boundItem(xfa.event.change); <br />var cities = new Array( <br />  new Array("New Orleans", "NYC", "L.A."), <br />  new Array("Paris", "Lyon", "Marcheilles"), <br />  new Array("London", "Liverpool", "Newcastle", "Manchester"), <br />  new Array("Tokyo", "Kyoto", "Hiroshima"), <br />  new Array("Bremen", "Hannover", "Hamburg", "Berlin")); <br />for (i=0;i<cities[myIndex].length;i++){ DropDownList2.addItem(cities[myIndex][i] , String(i)); } <br />/Ulf DTP-tjänst

  • Setting own security handler with JavaScript

    Hi,
    I build the security handler plugin example (SecurityHandler.api) and installed it. Then I wanted to set this handler via JavaScript to a document but I have no access to it. If I list all handlers (security.handlers) in a trusted function only the standard handler occur. If I change the security settings via Adobe I have the handler listed in the drop down box. I am using Acrobat 8 Professional.
    Many thanks for your advice in advance!
    Regards
    Jörg

    Ian,
    As a general statement, wireless networks are inherently insecure.
    "I have now switched off the broadcasting of the name.
    What level of security is this?
    If this is all you have done, roughly speaking, your network is just as
    (in)secure as it was when you plugged in the router.
    Do you have file or printer sharing turned on? Are your Mac firewalls
    stealthed and refusing UDP packets? Will the router accept any inbound
    request for an internet connection? Have you changed the default password
    on the router?
    The answers to these questions speak to the relative (in)security of your
    Macs.
    Is your son using any form of encryption, say, WEP, or, preferably, WPA?
    If not, your network is less secure.
    "We live in a quiet cul-de-sac where any strange people or cars would be noticed immediately, so we are probably not so vulnerable to wireless-hackers as others might be. Or am I living in a "fool's paradise"?"
    Yes, and here's why.
    "Does anyone know where I might be able to get hold of some reasonably simple, step by step instructions."
    I was going to suggest reading the router's manual, but it is pure and utter
    fertilizer. Looks as though a marketroid (who knows some buzzwords but
    not their meanings) patched that monstrosity together using the user
    menu storyboard walk-through and a lot buzzword-laden filler "lifted"
    from the Web.
    Would it be humanly possible to run an ethernet cable from your router to
    where your son computes and turn off the wireless?
    Since I don't own one, I can't help with a primer on securing it. Sorry.
    -Wayne

  • Set Email Description (body) with javascript

    I am trying to set the Email description in the OnLoad event of the email form in CRM 2011
    Using this code:
    "Xrm.Page.getAttribute("description").setValue(mailText.toString());"
    In OnLoad of the email form my script is excecuted every time it loads / refreshes the page but the description is sometimes shown and sometimes not.
    Does somebody know about this behavior and may have a solution?
    Greez

    Thx for your reply. The rest of the code is working. I debuged it about 1000 times. :)
    But here it is:
    function FillEmail()
    var lookup = new Array();
    regObj = Xrm.Page.getAttribute("regardingobjectid").getValue();
    if (regObj != null)
    if (regObj[0].entityType == "new_besuchsbericht")
    var bericht = CrmRestKit.Retrieve("new_besuchsbericht", regObj[0].id, [
    "new_name",
    "OwnerId",
    "new_OrtdesBesuchs",
    "new_AnsprechpersonId",
    "new_Besuchsdatumvon",
    "new_Besuchsdatumbis",
    "new_Teilnehmer",
    "new_Beschreibung"
    ], null);
    var thema = bericht.new_name;
    var owner = bericht.OwnerId;
    var ortDesBesuchs = bericht.new_OrtdesBesuchs;
    var ansprechperson = bericht.new_AnsprechpersonId;
    var besuchsdatumvon = bericht.new_Besuchsdatumvon;
    var besuchsdatumbis = bericht.new_Besuchsdatumbis;
    var teilnehmer = bericht.new_Teilnehmer;
    var beschreibung = bericht.new_Beschreibung;
    var ansprechName = "";
    if (ansprechperson.Name != null)
    ansprechName = ansprechperson.Name;
    var dateVon = new Date(parseInt(besuchsdatumvon.replace("/Date(", "").replace(")/", ""), 10)).toLocaleString();
    var dateBis = new Date(parseInt(besuchsdatumbis.replace("/Date(", "").replace(")/", ""), 10)).toLocaleString();
    var mailText = "<div style=\"font-family: Arial; font-size: 11pt;\">";
    mailText += "Thema: " + thema;
    mailText += "<br/><br/>";
    mailText += "Ort des Besuchs: " + ortDesBesuchs;
    mailText += "<br/><br/>";
    mailText += "Ansprechperson: " + ansprechName;
    mailText += "<br/><br/>";
    mailText += "Besuchsdatum von: " + dateVon;
    mailText += "<br/>";
    mailText += "Besuchsdatum bis: " + dateBis;
    mailText += "<br/><br/>";
    mailText += "Teilnehmer: " + teilnehmer;
    mailText += "<br/><br/>";
    mailText += "Beschreibung: <br/>";
    mailText += beschreibung;
    mailText += "</div>";
    Xrm.Page.getAttribute("subject").setValue(thema);
    var mailDescription = Xrm.Page.getAttribute("description");
    if (mailDescription != null)
    mailDescription.setValue(mailText.toString());
    alert("description set");
    The Subject is set every time and the "alert" in the end is fired after every load of the page.

  • Dynamically Setting the Position of a Subform

    Hello there
    I am trying to solve an issue with the dynamic positioning of a subform not working when the form is rendered from a process.
    I have a flowed XDP based form with a variable amount of content, and a “totals” subform that needs to be positioned at the bottom of the last page.  I do this with some JavaScript which works out the current Y position of the “totals” subform, and then sets the top margin of a proceeding “spacer” subform appropriately.  The code runs on the docReady eavent of the main subform, and runs correctly when the form is rendered dynamically, for example from within Designer.
    We need to be able to generate the form using a LiveCycle service.   When we attempt this using the generatePDFOutput service, the code correctly calculates and sets the required margin.  However, setting the margin has no effect (the “totals” subform is not moved).  I am unclear why this does work, i.e. why there is a different effect when rendering the form from the process.
    I am unable to move the code to an earlier event.  The latest event for which setting a margin actually works is formReady.  However, at this point the code to determine the current Y position of the “Totals” subform does not work.
    One idea I had was to render the form twice.  On the first rendering of the form, the code could calculated the required margin.  On the 2nd rendering of the form, the margin would be set at an appropriately early event such as initialise.  However, I do not know how to pass a value calculated in JavaScript back to a process.
    Any ideas would be appreciated.
    Many thanks
    Geoff Olding

    Hi,
    You can set the caret position in the JTextPane with the method(in JTextComponent) :
    public void setCaretPosition(int position)For exemple :
    myJTextPane pane = ...
    Document doc = myJtextPane.getStyledDocument();
    if(doc!=null){
      myJTextPane.setCaretPosition(doc.getLength());
    }bye

  • Setting User Preferences With Javascript In Acrobat X

    Hi All,
    Is there a way thru Javascript to programatically set a value in the User Preferences?
    I am trying to create a batch sequence that exports PDFs to HTMLs. In the Acrobat X preferences, there is a conversion option that sets the option of "Run OCR If Needed" to true or false.
    Edit --> Preferences --> Convert From PDF --> HTML --> Run OCR if needed (True|False)
    Depending on conditions, I need to programtically set the value of this preference during the batch sequence before I export the document to HTML. Is this possible? Any help would be greatly appreaciated.
    Thank you,
    Teri

    There are very few user preferences that can be controlled with JavaScript, and this isn't one of them.

  • Setting shadow with Javascript

    For some odd reason, none of the Indesign's VBA-scripts works with InDesign CS5 anymore, maybe then reason is Office 2010 64-bit.
    Anyway, Javascript works just fine, but I'm having difficulties to write following script with JavaScript. Can anybody help?
    Simply script by setting up drop shadow for an active object.
    Set myInDesign = CreateObject("InDesign.Application")
    Set myObject = myInDesign.Selection.Item(1)
    myObject.transparencySettings.dropShadowSettings.angle=135
    myObject.transparencySettings.dropShadowSettings.opacity=33
    myObject.transparencySettings.dropShadowSettings.distance=1
    myObject.transparencySettings.dropShadowSettings.mode=2020623440
    myObject.transparencySettings.dropShadowSettings.blendMode=1852797549

    Hey!
    Here is the same code in JavaScript:
    var myObject = app.selection[0];
    with(myObject.transparencySettings.dropShadowSettings){
        angle = 135;
        opacity = 33;
        distance = 1;
        mode = ShadowMode.DROP;
        blendMode = BlendMode.NORMAL;
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Synchronizing 2D axis movement with indepedent velocity and position

    I am coding a motion control system using an NI-73xx motion control board and 2 stepper motor linear slides.  The requirement is for both slides to move at the same time (synchronously) yet each slide must have its own velocity and travel distance.  I coded the two axis successfully so they both will run one at a time within a state machine.  Then I created a state where the two axis ran in parallel.  This worked but the 2 axis were out of sync.... duh, I should've known that!
    Anyway, I rewrote the state machine "Run Both" instance using the Start Motion.flx set with Axis\VS Map configured to run axis 1 and axis 2 along with the Resource input set to Axis Control (0).  I'm still having problems. The x axis only runs 1 time.  the y axis runs too many times?  I'm not sure whats going on.  Can someone look through the block diagram and tell me what I am missing.  I have been staring at it too long and I know I am overlooking something(s).
    Thanks,
    Christian
    Attachments:
    2D axis synch - front.JPG ‏85 KB
    2D axis synch - block.JPG ‏228 KB

    Because of the specific VI's used in this program, I am not able to save it for previous version.  However, I have taken a screen shot of the block diagram so that you can build it yourself.  It is a very simple program and most of the VI's should still have the same name in 2011 as in 8.6.  One thing I will point out is that the synchronization occurs in the flat sequence structure.  By having the smart motion VI's within the sequence structure, the motors will not be updated until both VI's receive data.  This is still software timed synchronization, and so it will be dependent on Windows OS jitter which can be as much as 500ms depending on how many processes are running.  Depending on your application though this might be a sufficient amount of synchronization.  Please let me know if you have any questions about this program or the VI's I used.
    Regards,
    Chris L
    Applications Engineer
    National Instruments
    Certified LabVIEW Associate Developer
    Attachments:
    Control 2 Axes BLOCK DIAGRAM.png ‏22 KB

  • Can't write anything with javascript in a new window create dynamically with "window.open"

    I develop a website and an application in html/css/javascript and i have a problem.
    I need to open a new window with "window.open", and then change and modify the content dynamically with javascript in it. It works perfectly in Firefox 3.6 and lower but not in Firefox 4.
    In Firefox 4, the window is created, but it stay white with "about blank" as name.
    Do you have an idea of what I can do? Can I detect if the browser is Firefox 4, and if it is true, instead of "window.open", create a new tab? Can I change the content dynamically in it, and how?
    Thanks for your help
    Jonathan Donzallaz

    This forum focuses on end-user support. You can find more web development help on the [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board]. Separate forum, separate registration. Please note the tips in the Sticky Post at the top of the forum before posting. Also, it's helpful to post a link to a "test case" that demonstrates the problem.

  • Dynamically set maximum row count in Interactive Report

    Hi,
    Has anyone worked out a way of dynamically setting (e.g. via select list) the maximum row count value for an Interactive Report, taking into account issues with order by when the report is filtered. I'm aware of solutions like this: http://www.talkapex.com/2010/10/apex-reports-no-limit-downloads.html but as far as I can tell this doesn't work when the report is filtered and the IR is rewritten in the background. Data sets then become unreliable because they are reordered.
    Thanks,
    Mike

    Hi Mike,
    You can do that with javascript
    gReport.search('SEARCH',100)the 100 you can replace for any number you like.I have a report with filter,sorting and groups and it is gives no problem there.
    any number means any number but not higher than the number you set at Maximum Rows Per Page.
    You probably can mix the solution from Martin and the above code.
    Regards,
    Kees Vlek
    <tt>Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66</tt>
    If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
    Edited by: kvlek on 24-apr-2013 12:29
    Edited by: kvlek on 24-apr-2013 12:35

  • Error while passing URL Dynamically in SOAP AXIS adapter..!!

    Hi ,
    Idoc> XI>SOAP-AXIS
    I am doing a scenario where I need to pass the URL dynamically in SOAP-AXIS adapter by taking the RCVPRN of Idoc.
    If
    RCVPRN = 100 , message has to go to http://10.190.25.16:8210/file/receiver
    RCVPRN = 200 , message has to go to    http://10.190.25.16:8210/file/receiver2
    RCVPRN = 300 , message has to go to    http://10.190.25.16:8210/file/receiver3
    I used the below UDF and it is working correctly and generating the URL dynamically .
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/SOAP", "TServerLocation");
    conf.put(keyHeader1, a);
    return "";
    The value is coming in SOAP document as expected like below.
    <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:Record namespace="http://sap.com/xi/XI/System/SOAP" name="TServerLocation">http://10.190.25.16:8210/file/receiver3</sap:Record>
      </sap:DynamicConfiguration>
    I used the below Configuration modules in receiver SOAP-AXIS adapter as suggested in Note 1028961.
    AF_Adapters/axis/AFAdapterBean ---> afreq
    AF_Adapters/axis/HandlerBean ---> xireq
    AF_Adapters/axis/HandlerBean ---> dc
    AF_Adapters/axis/HandlerBean ---> remover
    AF_Adapters/axis/HandlerBean ---> trp
    AF_Adapters/axis/HandlerBean ---> xires
    AF_Adapters/axis/AFAdapterBean ---> afres
    xireq -> handler.type-> java:com.sap.aii.axis.xi.XI30OutboundHandler
    dc -> handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
    dc ---> key.1 ---> write http://sap.com/xi/XI/System/SOAP TServerLocation
    dc ---> location.1 ---> context
    dc ---> value.1 ---> transport.url
    remover ---> handler.type ---> java:com.sap.aii.axis.soap.HeaderRemovalHandler
    remover ---> namespace ---> http://sap.com/xi/XI/Message/30
    trp ---> handler.type ---> java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    trp ---> module.pivot ---> true
    xires ---> handler.type ---> java:com.sap.aii.axis.xi.XI30OutboundHandler
    and I am getting the below error in SOAP-AXIS channel at the point java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender.
    2009-03-02 15:23:44 Success Axis: getting handler trp of java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    2009-03-02 15:23:45 Error Axis: error in invocation: (500)internal server error
    2009-03-02 15:23:45 Error MP: Exception caught with cause (500)internal server error
    2009-03-02 15:23:45 Error Exception caught by adapter framework: (500)internal server error
    2009-03-02 15:23:46 Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: (500)internal server error: (500)internal server error.
    2009-03-02 15:23:46 Error The message status set to NDLV.
    Kindly let me know if anyone has any idea what might be wrong?
    Note : The given URL is correct one because I cross checked by passing them normally by giving directly in adapter and they are all working and the message is going to receiver.
    Thanks
    Deepthi

    Hi Stefan,
    >> dc -> handler.type-> javasap.aii.axis.xi.XI30DynamicConfigurationHandler
    >> dc ---> key.1 ---> write http://sap.com/xi/XI/System/SOAP TServerLocation
    >> dc ---> location.1 ---> context
    >> dc ---> value.1 ---> transport.url
    >> Try read instead of write
    When I tried with this, I am getting the below error "Connection refused ".
    Success Axis: entering HandlerBean
    Success Axis: getting handler trp of java:com.sap.aii.adapter.axis.ra.transport.http.HTTPSender
    Error Axis: error in invocation: java.net.ConnectException: Connection refused
    Error MP: Exception caught with cause java.net.ConnectException: Connection refused
    Error Exception caught by adapter framework: ; nested exception is: java.net.ConnectException: Connection refused
    Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: ; nested exception is: java.net.ConnectException: Connection refused: java.net.ConnectException: Connection refused.
    Success The message status set to WAIT.
    It is going successfully when I tried sending directly. Looks like Dynamic Configuration is not working for SOAP-AXIS.
    Any Suggestion?
    Thanks
    Deepthi.

  • More info needed on BC Dynamic menus and using CSS with them

    Hi all,
    The BC Gurus tutorial on Dynamic Menus and how to style them with CSS made no sense to me, unfortunately. The presentation was too rushed and the screen too small to see what was happening.
    In a previous question I found out how to apply CSS classes to BC menus after a bit of a run around.
    I was putting the # in front of the Item ID name and a . in front of the class name and this was not necessary.
    I have further questions though, as I am still struggling to get a BC Dynamic menu to style properly with the CSS I have created.
    1. If you choose CSS as the menu type, can you set the font, background colour and rollover state of the menu items in the Dynamic menu section? Or do you have to style it all in the CSS stylesheet?
    2. If you choose CSS as the menu type, the option to say how the submenu sits under the root menu disappears. So do you need to set this in the CSS stylesheet? And if so in which element? UL or LI?
    3. If you choose CSS/HTML only, how is this different to the option of CSS for the dynamic menu?
    4. If you choose CSS as the menu type and if you set a width and height in the menu item, and then set a different width and height in the CSS stylesheet, which width and height wins?
    5. If you want a dynamic menu to show on an Android phone, do you have to choose CSS/HTML only and do all the styling in the CSS stylesheet? Or should you avoid dynamic menus all together and just use a UL list in the template? (I am doing a responsive fluid grid layout in DW for the template).
    6. I am finding that the dynamic menu I have done, with CSS as the type, does not show and hide the sub menu items properly on an Android phone. Is there a problem with the javascript in Dynamic menus?
    Thanks for any help you folks can give on these questions!

    .pacnew files are only created if you have modified the default (or a change has been made to the config upstream); in both cases, you should be looking to incorporate the changes.
    It seems some new options are being shipped with lxdm: you want those in your config (turning them on or off is a matter for you and the man page to sort out)...

  • How do I set tabs in textFrames with tabStops?

    Could anyone show me the javascript syntax, or point me to a script, that sets tabStops and positions them.
    I can't get it working.
    Please ask if any further clarification or explanation would be usefull.

    I see that overnight the JavaScript heavyweights have waded in. Thanks Guys. It seems I can't edit my original post now, so I'm having to reply to it.
    From what I gather you are saying, I can't create a tabs with a script. But maybe if my template document had a text box containing tabs I could copy the paragraph attributes to a new paragraph and them manipulate the TabStop.position value.  Would that be the way to proceed?
    Carlos, you asked to see what I'd done so far so here it is!  As you will see I'm an enthusiastic novice with a lot to learn when it comes to javascript, so any comments or suggested improvements anyone cares to make would be most welcome.
    I am creating ai files containing text and graphic elements created from data in a XML file, mostly these are tabular data. Below is the function that handles the text elements.
    function layOutText(ele){
        var eleText;
        if (ele.@type=="area") {
            var rectRef = doc.pathItems.rectangle(ele.position[0]/1, ele.position[1]/1, ele.size[0]/1, ele.size[1]/1);
            eleText = doc.textFrames.areaText(rectRef);       
            if (ele.@class=="dataTabbed"){
                var dataArray= new Array ();
                eleText.contents=splitDataString(ele.value.toString());//this is a call to a function that splits and puts in the command characters for the tabs and
                eleText.paragraphs[0].paragraphAttributes.tabStops.length=ele.tab.length();
                for (tab=0; tab<ele.tab.length(); tab++){
                 eleText.paragraphs[0].paragraphAttributes.tabStops[tab].tabStopsInfo.position=ele.tab[tab ];// this doesn't work
            else {
                eleText.contents= ele.value.toString ();
            if (eleText.paragraphs)eleText.paragraphs[0].hyphenation=false;
        else {
            eleText = doc.textFrames.add();
            eleText.position=[ele.position[0]/1, ele.position[1]/1];
            eleText.contents= ele.value.toString ();
        eleText.textRange.characterAttributes.textFont=app.textFonts.getByName(ele.fontStyle.font .toString());
        eleText.textRange.characterAttributes.fillColor=giveColor(ele.fontStyle.colour.toString() );
        if (ele.justification.@type=="center") eleText.paragraphs[0].justification = Justification.CENTER;
    I am passing it a XML objects that prints out something like
    <textElement type="area" class="dataTabbed">
      <value>Benefit t £9,600 t 40% t 23% r Clarins t £7,000 t 10% t -13% r Dior Beaute t £4,500 t 5% t 26% r No7 t £21,500 t -10% t -16% r YSL t £3,200 t -20% t 37%</value>
      <tab type="left">400</tab>
      <tab type="left">600</tab>
      <tab type="left">800</tab>
      <tab type="left">1000</tab>
      <tab type="left">1500</tab>
      <position type="top">275</position>
      <position type="left">10</position>
      <size type="width">350</size>
      <size type="height">140</size>
      <justification type="left"/>
      <fontStyle class="data">
        <font>Tahoma</font>
        <size>11</size>
        <colour>black</colour>
      </fontStyle>
    </textElement>
    Thank you.

  • Open and Close Popup With Javascript

    Using Apex 3.2
    I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
    I have opened a pop up window with javascript
    Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
    I have a hidden item on my pop up called P7_FLAG.
    I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
    I also have a SUBMIT button.
    So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
    My current javascript look like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>On my button
    javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
    First time it sets P7_FLAG
    Second time it closes page and refreshes.
    I have probably made some basic error, but today I cannot see it.
    Cheers
    Gus
    Edited by: Gus C on May 10, 2012 12:48 AM

    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>javascript does not wait for the current action to complete and then perform the next line.
    means in your function call
    doSubmit('SUBMIT');is triggered and it carry on's to next line that is
    $x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
    what you need to do is amend your js function like below
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    </script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
    and set the branch source to below
    htp.p('window.close();');
    htp.p('window.opener.doSubmit(''REFRESH'');');

Maybe you are looking for

  • How many times can you transfer itunes to ipod?

    After I accidentally erased my itunes from my ipod i tried to re-transfer them from itunes library. Can I do this more than 1 time or is one time the limit on songs purchased from itunes?

  • Print dialogue box not opening with HDR image

    I created an HDR image using HDR Efex Pro 2 a month ago and printed it.  It is saved as a psd file.  I went to print it yesterday and the print dialogue box won't open. I've tried alt tab to check the box isn't open and hidden.  I've re-created the i

  • HT3275 The backup disk image "/Volumes/Data/iMac.sparsebundle" is already in use.

    The backup disk image "/Volumes/Data/Connie's iMac.sparsebundle" is already in use. Time Machine has stopped backing up. I deleted the selected disc and re-selected which one to use. Not sure what else to do.

  • Why is 350gb of files taking up 750gb of space?

    I'm in a strange situation where my Macintosh HD says ive used 750gb but the individual folders within MacHD only total about 350gb I've used a program called omnidisksweeper and I seem to have a 350gb volumes folder and a 340gb users folder in the s

  • Dedicated Server Connection Vs Shared Server Connection

    Hi Gurus, I have few doubts regarding Dedicated Server Connection Vs Shared Server Connection - 1) How do I know which connection mechanism is configured in my system. 2) Which connection faster and reliable. 3) Is there any risk to using shared serv