Use of javascript in branch

Hi,
I have a branch using the following javascript:
javascript:{if (confirm('U heeft uw gegevens niet opgeslagen! Deze zullen verloren gaan. Doorgaan?')) redirect('f?p=&APP_ID.:1:&APP_SESSION.');}
I can use this javacode in the branch of the button itself, but I want to use it in the page-branch, so I can make the branche conditional. How can I make my javascript work on the page-branch?
Thanks.

Hello,
>> When the user presses the "cancel" button, I want to again put the values of the form in (another) APEX collection and compare the two.
Well, you can only do that with AJAX. The following Blog entry, by Joel, will give you the basics - http://joelkallman.blogspot.com/2008/03/preserving-checked-checkboxes-in-report.html. This is not the same situation as you are describing, but all you need in order to create your own solution is there.
Having said that, maybe you should consider a simpler solution (provided tracking changes is all you need). For example, attaching an onchange event to your updatable columns that will set a hidden item on the page. When the user presses the cancel button, you can check the value of this item. If it was set, you can issue a proper alert.
Regards,
Arie.
♦ Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
♦ Author of Oracle Application Express 3.2 – The Essentials and More

Similar Messages

  • How to open an URL and close the URL window, using adobe javascript

    Hi,
      Is it possible to open an URL and close the URL back again(without allowing the user to perform any other operation)? I was able to acheive the opening of the URL, using the app.launchURL("address". true); - But here it lauches in new window, and how do i close the window using the javascript. Is it possible?
    Thanks.

    Hi all
    In addition to what Bobby W - Adobe TS added, you might find
    the following useful as a bypass or workaround to the pesky prompt.
    var pw=window.parent;pw.opener=window.self;window.open("
    http://www.adobe.com");
    pw.close();
    I think this will only work for IE browsers. Actually, I
    think the whole window.close() only works for IE, but could be
    wrong about that.
    Cheers... Rick

  • Advise on using DBMS_XA with multiple branches under one global transaction

    Dear all
    I need some advise on using DBMS_XA from PL/SQL with tightly coupled multiple branches under one global transaction. Basically, I've successfully written some PL/SQL code that in 3 different sessions attaches to 3 different branches of one global transaction and before ending each branch they can see each others uncommitted data. So far so good.
    However, I'm not sure I completely understand how each branch must call xa_end, xa_prepare and xa_commit correctly using two phase commit and my calls result in errors like:
    ORA-24767: transaction branch prepare returns read-only (XA error code 3 = Transaction was read-only and has been committed)
    ORA-24756: transaction does not exist (XA error code -4 = XID is not valid)
    ORA-02051: another session or branch in same transaction failed or finalized
    This is the structure of my programs (3 SQL*Plus sessions):
    main: Uses xid 123|0 (branch 0 of global transaction 123). This should be the coordinator that commits using two phase commit across the 3 branches
    m1.xa_start tmnoflags
    m2.DML
    m3.Wait for thread A + B to manually be started and run xa_end
    m4.xa_end tmsuccess
    m5.xa_prepare
    m6.xa_commit false
    thread A: Uses xid 123|A (branch A of global transaction 123)
    a1.xa_start tmnoflags
    a2.DML -- thread A can see main and thread B's data
    a3.xa_end tmsuccess
    a4.xa_prepare -- required?
    a5.Should we also call xa_commit false?
    thread B: Uses xid 123|B (branch B of global transaction 123)
    b1.xa_start tmnoflags
    b2.DML -- thread B can see main and thread A's data
    b3.xa_end tmsuccess
    b4.xa_prepare -- required?
    b5.Should we also call xa_commit false?
    The failing steps are:
    m5
    m6
    a4
    a5
    b4
    b5
    Before starting calling xa_end I see 3 rows in V$GLOBAL_TRANSACTION, eg (hex 7B = decimal 123):
    FORMATID GLOBALID BRANCHID BRANCHES REFCOUNT PREPARECOUNT STATE FLAGS COUPLING
    203348753 0000007B 00000000000000000000000000000000 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    203348753 0000007B 0000000000000000000000000000000A 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    203348753 0000007B 0000000000000000000000000000000B 3 3 0 ACTIVE 0 TIGHTLY COUPLED
    Thanks a lot in advance.
    Cheers
    Finn

    OK, I've figured it out. This is poorly documented as it's not well explained how to handle the various return codes. Turns out that all but the last xa_prepare calls return dbms_xa.xa_rdonly (tightly coupled branches are combined -- "read only" optimization), the last one returns dbms_xa.xa_ok and this is when you should call xa_commit.
    Now my next problem is that DBMS_XA doesn't work from within jobs (DBMS_JOB and DBMS_SCHEDULER), which makes it very difficult to use DBMS_XA. My purpose of using DBMS_XA is to coordinate work across multiple sessions in one transaction but if I can't easily create the multiple sessions, I'm stuck.
    When called from a job, xa_start throws:
    ORA-24789: start not allowed in recursive call
    on Oracle 11.2. In Oracle 11.1 it works, but xa_end fails with
    ORA-25352: no current transaction
    so I guess in fact the xa_start call didn't really work either, even though it returned tm_ok.
    I'm now trying to find a workaround on how to use DBMS_XA from within jobs, please comment if you have any suggestions. Or if you have any suggestions on other means of establishing the concurrent sessions (I wouldn't like to resort to external programs that need username/password to connect as password management would be a security issue).
    Thanks in advance.
    Cheers
    Finn

  • Using browser javascript to copy selected text from a pdf file opened in Air app.

    I have posted this question on reader forum as well, but I think it is more suited here...
    I am trying to create a note-taking application in air. I want to extract selected text from pdf file as a string object or to the clipboard.
    Obviously, all pdfs in my local storage will not be scripted to recieve postMessages and act accordingly, and that is not practical either. So, my problem is, how can I copy the selected text in the pdf file (opened as an object in htmlloader within my Air app) to clipboard or directly in another control by say clicking a button in air application? I suppose, this is possible using javascript, however, I don't know which reader methods are exposed to the wrapper htmlloader control. In short, I want to execute app.execMenuItem("Copy") command through htmlloader javascript. Any alternate solutions are also welcome.
    This is similar to passing inbuilt commands/methods/functions (of adobe reader) to pdf-reader plugin embedded in a webpage via javascript. This is possible in IE where the pdf is rendered as activex object, and hence JSObject interface of pdf document/reader is accessible to the browser javascript. I have also read that this same JSObject is accessible to VB as interface for IAC, so as the Air is Adobe's own product, I was wondering if equivalent of JSObject is accessible to htmlloader control as well.
    Thanks in advance...
    Mits

    Thank you Thom for your reply...
    from
    http://www.adobe.com/devnet/acrobat/javascript.html
    ...Through JavaScript extensions, the viewer application and its plug-ins expose much of their functionality to document authors, form designers, and plug-in developers...
    As it is explicitly mentioned, that the functionality of adobe reader are exposed for plugin development, I thought someone here might have used external javascript to execute some safe methods in adobe reader. The functionality (i.e. external javascript interface-JSObject) is already available for VB programmers to develop IAC. Further, the Acrobat SDK example called "AcroPDFinHML" shows how one can embed a pdf-reader in a html page and execute some safe methods (like gotonextpage(), zooming etc.) in IE as ActiveX plugin. I have checked it myself for adobe reader 9, and it works perfectly, so there is no security issue as such to implement the same for another browser (like in my case, the htmlloader control in flex/air app).
    I intend to create a note taking application in air, where it is very much required that I should be able to copy selected text from various pdf documents, that are open in my app, and subsequently paste/collect/save the collected notes and process them afterwords (offcourse, from the pdfs that allow me copying text). However, it is not happening for me here. As the pdfs are opened through adobe reader plugin, it does not register the copy command executed by my air app. It registers the system level copy command (by keyboard shortcut Ctrl+C), but my air app has no way to execute the system level copy command programmatically. So I am kind of stuck here...
    Thanks again for your reply. Having known what am I intend to accomplish, any other (may be alternative) solutions will be appreciated nonetheless...
    Mits

  • How to make use of javascript functionality in WD application?

    hi,
    I want to use some javascript functionality in my web dynpro application.
    This is my requirement:
    I want to design templates for User's ID card.
    For that , I need to use label, image area, headings in that template as drag and drop objects(so that we can move the lable, image fields whereas we want in that template area).
    We have already done this scenario by using javascript.
    How could it be possible in web dynpro?
    Can I use the existing javascript in my WD application?
    Anyone Pls suggest me.
    Thanks.

    hi Abdul,
    in addition you could read documentation on the popupmenu, you can find here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/de/416d42ab7fd142e10000000a1550b0/frameset.htm
    BTW: This only works for NW2004s (-;
    Kind regards
    Stefanie

  • Security flaw-To use CSOM/Javascript code for Custom Office365(Sharepoint Online) application

    Hi,
    I've developed custom application in Office365(Sharepoint Online) using CSOM/Javascript. Security team from client side has been reported one major issue to the our application that any end user can comment our CSOM/Javascript code and bypass the validation
     or can update / insert into sharepoint list item using developer tool/ Console in Google Chrome(F12 Key).
    Also end user can write his own separate code in console of Google Chrome (Developer Tool / F12) and can update / insert  into Sharepoint List.
    Note:- End user has Add, Edit, View permission on all Sharepoint List.
    This is one major security flaw of the Sharepoint/Office365 to use CSOM /Javascript for writing code, to overcome this issue could you please provide me some solution.
    Your help would be greatly appreciated!!!  
    Looking for reply.
    Thanks,
    Mahesh Sherkar
    Web: http://Mahesh-Sherkar.com
    Email: [email protected]

    Hello Paras, 
    Did you get any solution for this? I think your website was implemented this form. Can you please tell me the way how I can achieve it? I am also facing same problem. Please reply me as early as possible.
    Thanks,
    Mihir

  • Using "Execute Javascript" to mark a course as Complete. 

    I am using a 3rd party Flash-based player (Flashform) to
    bundle Captivate and Flash made SWF files into a SCORM 1.2 package.
    My final SWF is a Captivate assessment, which, if passed, should
    change the course lesson status to “completed”. Can I
    accomplish this by using “Execute Javascript” on a
    button and run something like:
    “FSCommand("LMSSetValue","cmi.core.lesson_status,completed");”
    Any advice is greatly appreciated.
    Jon

    If you were using only the Captivate-published files for
    SCORM, it would likely be fairly straightforward to do what you're
    looking for.
    Unfortunately, since you're using a 3rd-party player, you'll
    have to consult the documentation for the player to determine which
    capabilities it exposes and how you can access those capabilities.

  • Connect database using ext javascript or applescipt in indesign

    Hi,
    I need to connect oracle database using extended javascript or apple script in indesign. Can somebody help by giving any suggestion. Or is there any possibility to connect database using the two scripting methods.
    It  is really urgent.
    Thanks
    Karthik B

    ExtendScript has a Socket object prototype you can use to e.g. connect to the internet. Calling a web service would probably be more elegant than addressing the database directly. Socket is fairly low-level, though. If you need something easier, you could always try out http://extendables.org/docs/packages/http/doc/readme.html
    I seem to recall some InDesign plug-ins you could buy that allow you to connect to a database directly, but you'd have to google that yourself.

  • How to read a text file using adobe javascript

    Hi,
    I have a api application which adds toolbar to a adobe acrobat. i need to disable the toolbar according to expiry date, So i need to fetch the expiry datge from a text file from the specified location.
    I am using importTextData() function to get the textdata from text file using adobe javascript. When i call this function i am getting error "ReferenceError: importTextData() is not defined".
    I am using Adobe Acrobat 7.0 version.
    Can any one tell how to use the importTextData() function.
    Regards
    Shiva

    calling from javascript file which is placed in the below location.C:\\Program Files (x86)\\Adobe\\Acrobat 7.0\\Acrobat\\Javascripts
    Regards
    Shiva

  • Use of JavaScript in Adobe Forms

    Hi guru's...
    Are there any restrictions in the use of JavaScript Coding within Livecycle Designer?
    Which objects, methods and/or functions can be used and which can't?
    Is there a reference guide for this?
    And is there a way to use some kind of debugging for testing the JavaScript code within an Adobe Form?
    Thanks in advance
    Wouter Heuvelmans
    SABIC Europe SAP Competence Center

    Hi,
    You can learn JavaScript(use it as reference) from this site...
    <i><b>http://www.w3schools.com/</b></i>
    And coming to restrictions...I dont find as such any till now in my usage...
    I used to use ALERTS for DEBUGGING purpose...
    Here is some sample coding...
        <i>var strText = "Raja";
        alert("Hello Javacript"+strText);</i>
    Regards,
    <i><b>Raja Sekhar</b></i>

  • We tried the window.ResizeTo and window.MoveTo methods using the javascript. It doesn't seem to be working in the version 9.0.1. Please suggest any alternative .

    Hi,
    We tried the window.ResizeTo and window.MoveTo methods using the javascript. It doesn't seem to be working in the version 9.0.1. Please suggest any alternative .
    Thanks,
    Avinash

    This is no longer allowed for security reasons (bug 565541).<br>
    See https://support.mozilla.org/nl/questions/880032<br>
    https://developer.mozilla.org/en/DOM/window.moveTo<br>

  • Is it possible to change out of the box Callout content for already existing library using some javascript API ?

    Is it possible to change out of the box Callout content (change DOM elements) for already existing library using some javascript API?
     API ?

    Hi,
    We can use CSS and jQuery to achieve it.
    Please add the following code into the Content Editor Web Part.
    <style type="text/css">
    .js-callout-content{
    display:none;
    .js-callout-mainElement span{
    display:none;
    .js-callout-mainElement{
    border-width:0px;
    </style>
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("a[title='Open Menu']").click(function(){
    setTimeout(function(){
    $(".js-callout-body .js-callout-bodySection").eq(0).html("<span>Test</span>");
    $(".js-callout-mainElement span").show();
    $(".js-callout-content").show();
    $(".js-callout-mainElement").css("border-width","1px");
    },1000);
    </script>
    Result:
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Examine Document... using Acrobat javascript

    Hi,
    I am using Acrobat 9 version.
    I have a pdf which has some hidden text. I am using Acrobat menu  Document -->Examine Document... to find if the PDF has any hidden text or not.  If the Examine Document... shows the Hidden text (1 page), then I remove the hidden text using Remove button at the bottom of the examine status window.
    My question is, it is possible to do this task using Acrobat Javascript.
    I am having more than 500 PDFs, so opening each and evert PDF and examining the documnet takes more time. If there are options in Javascript, please let me know.
    Thanks,
    Gopal

    Thanks for your reply.
    The preflight option "List invisible text objects" does not generate the report saying that the PDF has invisible text objects.
    Also, "PDF names"means name of the PDF document (Ex: sample.pdf). Is there any way to achieve this using Javascript code?
    Thanks,
    Gopal

  • How to execute preflight profile using Acrobat Javascript

    Execute a pre-flight profile using acrobat javascript and  call that function in VB.Net.

    See: http://help.adobe.com/livedocs/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/common/htm l/wwhelp.htm?context=Acrobat10…

  • How can i use C/Javascript/php/Java in flex?

    can i embed these language into my flex project?
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    please help~

    saipanBETTY0509 wrote:
    Subject: How can i use C/Javascript/php/Java in flex?
    can i embed these language into my flex project?
    You can't.  Why do you want to do this?
    saipanBETTY0509 wrote:
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    I think what this means is "I want to check to see how much hard disk space is available.  Also, I need to check the pixel dimensions of an image."
    Is that right?
    There is no way in the Flash Player (as far as I know) that you can determine the amount of free disk space.  However, in AIR you can use air.File.applicationStorageDirectory.spaceAvailable to determine the storage space available in the application storage directory.
    As far as determining the dimensions of an image, there are plenty of good resources out there on that.  Maybe this one will be helpful to you?
    http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-pr ocessing-local-images/
      -Josh

Maybe you are looking for

  • Sequencia de numeração de nota fiscal

    Boa tarde a todos, Pessoal estou enfrentando um problema na empresa onde trabalho referente a numeração de notas fiscais. Na semana passada mudamos a numeração das notas para série 2 fazendo assim o reinício das notas, mas o problema é que do nada ti

  • How to find out what the latest update is for something from apple's site?

    i've never been able to do this, and has been a recurring problem for many years: how can you, using apple's web site -- presumably the support or downloads section -- find out what the latest update for/of a certain product is? without going into th

  • No touch event is generated from mac book pro trackpad

    I am developing a multiltouch javafx application on mac, but no touch event was caught by the handler using trackpad. The event handlers are added to scence. I am using JDK1.7.0_07. Any one has any idea. Thanks.

  • Video drivers on start-up

    Hi, So on start-up, it says the error message about how the drivers are out of date. This only started happening because I had to do a system recovery to a week ago. I've tried running as administrator, updating my graphics by manually installing upd

  • I have a question to HU16E about OCing for P67A-GD65 board

    im currently struggling with OCing on P67A-GD65 B3 board. it seems like 2600k going to 4.4GHz with 1.3 vcore fine. but going over is bit confusing. i noticed HU16E has gone over 5.0~ speed. do you mind to share which settings you put in the bios? my