Can a Button call a java script and then proceed with the creation

Hi all,
I have a simple APEX form on a table,
with simple function as create and apply changes,
some items of the form are computed by a "Computation"
I need the create button to show the computed values, before move to the next page, then proceed with the creation ( submission)
I have tried to show the values by a java script, but after clicking the button OK of the javascript msg, no submission performed ,
details:
the java script is called in the URL of the Button,
it only contains a alert statement
is there a way to let the button do that
or may be the case could be solved by another idea!!!
rgrds,

Hi Varad,
It is Before header of course. I forgot to mention this.
Yes, you are right Varad, I have read again the question and seems original request was to show Computation that is done in After Submit, more javascript is required of course.
One possibility is to create On Demand process called COMPUTEITEM where you compute your item, and in the end of on demand process it prints it
htp.p(:P1_X)
Then put in HTML header of your page
<script language="JavaScript" type="text/javascript">
function setShowItemSub(pThis){
   var l_This   = $x(pThis);
   var ajaxRequest = new htmldb_Get(null, $v('pFlowId'),  'APPLICATION_PROCESS=COMPUTEITEM', $v('pFlowStepId'));
   ajaxRequest.add($x(l_This).id, $v(l_This));
   var gReturn = ajaxRequest.get();
   alert(gReturn);
   ajaxRequest = null;
  doSubmit('aa');
</script>And in Button URL textarea put:
javascript:setShowItemSub('P1_X');
Then no need in After Submit process anymore
I have put this now in http://apex6.revion.com/pls/apex/f?p=225:1
COMPUTEITEM On demand process is :
:P1_X := :P1_X || ' Added this trail';
htp.p(:P1_X);Of course, all this should be modified accordingly
Regards,
Oleg

Similar Messages

  • I am trying to download iTunes on my new desktop computer (Windows 7, 64 bit).  It starts installing, and then stops with the message- "The System Administrator has set policies to prevent this installation."  I am the sole user- please help.

    I am trying to download iTunes on my new desktop computer (Windows 7, 64 bit).  It starts installing, and then stops with the message- "The System Administrator has set policies to prevent this installation." This is a stand alone computer and I am the sole user.   Please help.

    This is a Microsoft Windows Issue.
    From a MS Support Engineer:
    "Hi,
    ·        Is the computer on a domain?
    ·        Is the issue isolated to only this software or you get the same error message with other software’s as well?
    Try the steps below and check if it helps.
    Step 1:
    Run the software setup file as an administrator and check if it helps.
    a. Right click on the setup file of the software that you are trying to install.
    b. Select “Run as administrator”.
    Step 2:
    Temporarily disable the antivirus software running on the computer and check if you are able to install the software.
    Disable antivirus software
    Warning:
    Antivirus software can help protect your computer against viruses and other security threats. In most cases, you shouldn't disable your antivirus software. If you have to temporarily disable it to install other software, you should re-enable it as soon as you're done. If you're connected to the Internet or a network while your antivirus software is disabled, your computer is vulnerable to attacks.
    Step 3:
    a. Click Start, type "Local Security Policy" (without quotes) and press enter.
    b. Click on Software Restriction Policies.
    c. In the right pane, double click on the "enforcement".
    d. Select “All users except local administrators”.
    e. Click Ok and restart the computer and check if the issue is fixed."

  • Button executing CloseWindow Java Script and raising event on server

    Hi All.
    Somebody can help me with this:
    <b>What i'm needing:</b> an 'END' button on a BSP, when the user click on this button just show an aswer box asking if the user wants to close the windows, in case to click yes close the current window and execute a business logic in the controller.
    <b>What i have:</b> a button with the event onClientClick invoking a Java Script function which is showing the answer box and the event onClick which raise the event on the server side. The thing is if the user click on yes then i'm closing the current window and the server event never is triggered. This is not working !!!
    Any ideas ? some sample code ?
    Thanks in advance.
    Armando.

    Hi Armando,
    The 'Yes' on the <i>Confirm dialog box</i> (Client Side Scripting) has to tell the application (Server side scripting) to call your METHOD XXX. This is done by passing querystring <i>exit=X</i> to the URL.
    1. Comment onClick event of the button.
    2. Modify the code the JS function of your End button as follows
       func_end()
    //if no
      // your original code
    // if yes
    document.location.href = document.location.href + '?exit=X';
    3. Add following code to DO_REQUEST
      IF REQUEST->GET_FORM_FIELD( NAME = 'exit' )  ne space.
    *your method will be called only when there is an exit=x in the url
           call method XXX.
    *set a page attrib as follows
           l_exit = 'X'.
      ENDIF.
    4. Add following code to your layout
    <%if l_exit = 'X'.%>
    <script>
    window.close();
    </script>
    <%endif.%>      
    Regards,
    Alwyn

  • HT5262 I use outlook for contact/calendar management, I have an iphone 5 and would a manual iTunes backup and then sync with the cloud work??

    I use outlook 2007to manage both contacts and calendar. I have a new iPhone 5.  Is the bestr way to update iCloud to do manual iTune updates and then sync to the iCloud.

    You want to avoid syncing calendars and contacts with both iCloud and iTunes.  Doing so will result in the creation of duplicates.  If you want to sync your iPhone calendar and contacts with iCloud, consider also syncing your computer with iCloud (requires Vista SP2 or higher and Outlook 2007 or higher).  iCloud will then keep the calendar and contacts on your phone in sync with Outlook without using iTunes.  (You would still, of course, continue to sync with iTunes for your other iTuens media.)
    This guide explains how to set this up: http://www.apple.com/icloud/setup/pc.html.

  • How can I get Firefox to "grab onto" and then "hold onto" the data signal until I tell Firefox to release it at the end of my session of internet browsing?

    ok, I hope that my description of this problem does not come out in such a disorganized fashion that it makes the description difficult to follow. here goes: every 30 seconds to 1 minute (or thereabouts, I'm estimating) my mobile phone's browser (whether Firefox or any other) loses the data signal, so that tje next time that. I click on something, I get an error message that the "data connection timed out, retry" or "network unavailable" or "check that you are connected to that internet", etc. etc. etc. I have downloaded many apps that are supposed to boost data connectivity and/or improve internet speed, blah, blah, blah, till I discovered that was a problem with the server being able to keep up with staying locked onto my browser. in one of these apps diagnostic screens, I found a notation that therr was something wrong with my cell's relative position. well, how could that be, I wondered, since I had "GPS tracking" "GPS reporting" and "location sharing" all enabled? but, then I noticed, on the image of my cell's location as represented by this particular app, that every half minute, or so, the blue dot which represented my cell's location would slip to the left about one quarter of an inch, or so, and in the longitude and latitude part of this app's diagnostic screen I saw that the numerical designations of my cell's longitude and latitude were zero and zero. it suddenly occurred to me that the server had lost sight of my cell because my cell had moved too far out of the range of that server's sight due to the rotation of the earth. well, blow me down, what am I supposed to do to fix that? how can I tell my cell phone's OS to send out some kind of identifying info on a constant basis, so that the server could keep track of it (and I would not lose the signal)? or, conversely, how could I get my cell phone's browser to grab onto the signal and not let go of it until I was done with that internet session, at which time I would then manually release the signal myself? I hope that my explanation of the problem made enough sense that you could follow it and that you can come up with a workable solution for me. oh yeah, my phone is an LG OPTIMUS ELITE 696. thanx, from the enragedkangaroo.

    Hello,
    I'm afraid I don't think there is going to be much we can do to help you here. The description sounds like an issue with the phone rather than with Firefox specifically.
    I don't think the problem can be caused by you moving out of range of the cell, due to the rotation of the earth. The cell towers (that provide phone signal) are sitting on the earth, just like you, and so move at the same speed as you. This might be a concern with satellite phones using Low Earth Obit satellites but this isn't the case here.
    I think the best thing to do would be to get in touch with your Phone Operator or Device Manufacturer for support. If you are out of the support period or can't get support from them for some other reason then a standard 'cure-all' for mobile phones is to do a Factory Reset. This will return your phone to its default factory settings and wipe all of your data / modifications off the phone. This tends to solve most problems and is probably what the official support team would tell you to do. I can't guarantee that it will help but it has a good chance.
    There are instructions on resetting your phone here:
    http://www.hard-reset.com/lg-optimus-elite-hard-reset.html
    I hope that helps.

  • Facebook doesn't load in ff or IE....sometimes I can get it by doing other things and then some of the games don't load completely ....have done all updates so what could be the issue

    facebook is my homepage in ff.so I login and then my homepage doesn't load.. ...sometimes I can go to fb help and click on games or other pages and it comes on by way of games usually.....but after a while it goes back off....same way in IE ....have done all updates got all latest versions so what is wrong ....I have read everything on this computer ...it has been this way for nearly 2 weeks now....so please help....even if I get the home page to come up then some game issues face me....loading halfway ...no friends names are showing etc.Please help........

    When I use find file http://www.macupdate.com/app/mac/30073/find-file (which does tend to find files that "Finder" can't), it's not coming up with any other itunes library files that have been modified in the past week, which I know it would have been - unfortunately, I don't have a very recent backup of the hard drive.  It would be a few months old so it wouldn't have the complete library on it....any ideas?  I'm wondering if restarting the computer might help but have been afraid to do so in case it would make it harder to recover anything...I was looking at this thread https://discussions.apple.com/thread/4211589?start=0&tstart=0 in the hopes that it might have a helpful suggestion but it's definitely a different scenario.

  • Can i activate a windows version and then verify with the serial number on a downloaded mac version of adobe acrobat?

    Hi there,
    I regret that i bought a windows version of the teacher and student Acrobat XI, because I´m useing a macbook.
    Do I have to send the product package with the CD back to adobe, or can i activate my product to get the serial number that also fits with the installed mac version?
    kind regards thanks for helping

    you need to exchange your product, Return, cancel, or exchange an Adobe order

  • I followed the instructions I read in a post to shutdown IPad holding the sleep button down until red arrow appeared.  The slide arrow and then restart with the sleep button.  Well, now nothing happens when I press this button to start IPad.

    I have two problems.  The most pressing is that I was following a suggestion to restart my IPad by turning off, sliding red arrow, wait for Apple symbol.  I now see the apple but alson the little marks that go around when it is working but they are frozen and my home key does not do anything and no icons appear. 

    Thank you so much.  This worked perfectly and you taught me something I didn't know.  The other question I had was that I am in a home with wifi and my ipad connected to the internet without a problem.  We then left for about a week and when I returned to this house I no longer can connect to the internet.  I'm not sure if it is okay to ask you another question or must I post the question.  Also, I am not sure how to five you the 10 points for the correct answer.  I'm very new at this process.   Thank you so much for helping me.

  • Can I install on my MacBook Pro and Windows PC with the same account?

    Hello
    I have a Mac and a PC(Win), now I am thinking about purchase Creative Cloud, can I install on my OSX and Windows? Or I need to buy 2 license?
    Thanks you all.
    Michael

    Cloud License allows 2 activations http://www.adobe.com/legal/licenses-terms.html
    -Install on a 2nd computer http://forums.adobe.com/thread/1452292?tstart=0
    -Windows or Mac does not matter... 2 on the same operating system, or 1 on each

  • HT1349 How do I go about installing software from a disc onto my ipad2? I have no external drive, but do have a PC with iTunes on it. Someone suggested I could load it into iTunes and then sync with the iPad, but this suggestion doesn't seem to work.

    How do I go about installing software from a disc (a language programme) onto my ipad2? Someone told me if I downloaded it to iTunes on my PC I could then sync it to the iPad but hav not been able to do that.

    Even if there was a convenient way, the software will not run on the pad.  Ios is a unique language, and only programs written for ios will run on the pad.   All of the programs are in the app store.  You might look there and see if the company that makes your sfotware also has an ios version, which would be in the store.

  • My computer downloads itunes and then right at the end it says I have insuffient priviliges in my C: file and that I should log on as administrator.  I have deleted Itunes completely and reinstalled it numerous times but it is still coming back with this.

    Can anybody help, my computer downloads itunes and then right at the end of the process it says that it cannot continue because I have insufficient privileges in my C:file/itunes/bin -log on as administrator????  Has anybody had this problem before and if so do you know how I can rectify this?
    Thanks.

    This is a Windows question about Windows user account privileges. Go to your Windows user account settings and check if your account has admin rights. If not, log in as administrator and give your account the correct rights. Or, better yet, when you get the message provide the admin account password and continue with the install.
    If you are not the administrator for the computer, contact him/her and ask them to install the app or give you the necessary privileges. Or try asking on a Windows forum.

  • How to call a java script?

    Hi,
    I m new to Indesign and also to MAC OS...
    I ve tried the sdk samples of InDesign CS3 on MAC OS. It works well.
    I m making changes to one of the samples (BasicPanel). I ve added few check boxes and buttons in it. I donno where to give the code for button(in the panel) event/action?
    I also need to know "how to call a java script from InDesign CS3 SDK ?"...
    I have the Scripts ready... Can someone provide the code used to call JS...
    Someone pls help me.....
    Thank You...

            Here s the code to call a Javascript:
            IDFile scriptFile;
            FileUtils::GetAppInstallationFolder(&scriptFile);                    //application folder path
            FileUtils::AppendPath(&scriptFile, PMString("Scripts", -1, PMString::kNoTranslate));               
            FileUtils::AppendPath(&scriptFile, PMString("Scripts Panel", -1, PMString::kNoTranslate));
            //inside the scripts panel, append path of the folder in which ur script is present.
            //Suppose, ScriptsPanel->NewFolder->Link.jsx
            FileUtils::AppendPath(&scriptFile, PMString("NewFolder", -1, PMString::kNoTranslate)); 
            FileUtils::AppendPath(&scriptFile, PMString("Link.jsx", -1, PMString::kNoTranslate));
            InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
            bool filestatus=scriptRunner->CanHandleFile(scriptFile);
            if(filestatus==1)
                scriptRunner->RunFile(scriptFile,kTrue,kFalse);
    Regards,
    tnhems

  • How to call a java script in while eventprocessing?

    hi friends,
    How to call a java script from an event.
    when i click a button, i want to display a message in IE.
    For ex: BTN_CAN,
    When i click on this in IE i want show a message like "clicked on cancelled".
    how can i do this.....
    in javascript WINDOW.ALERT i am trying....
    Regards,
    Shankar.

    you can do some thing like this...
    < % @  pa g e la ng uag  e="a b ap" %>
    < % @ e xte n sion name="htmlb" prefix="h tm l b"  %  >
    <  h t  m l b:co  nt e nt d es ign="design2 00  3"  >
      <  ht m lb:page title=" "    >
        <  h tm lb :for m  >
           < h t  mlb:textVi ew text   = "Hello World!"
                          des  ign = "EMPHASIZED" />
          < ht  m lb  :bu  tton text          = "Press Me"
                         on  Clie  ntC lick = "al ert(' H ell  w or l d')"  / >
        <  / h t mlb  :for m >
      < / ht mlb :pa g e >
    <   / htm lb:co nt e nt >
    Edited by: Vijay Babu Dudla on Oct 6, 2008 7:20 AM

  • Calling a java script function while page loads in ebiz

    Hi OAF gurus,
    I have a requirement of Calling a java script function at each OAF page renders or Loads.
    I.e. when any OAF page loads or render in Oracle e-biz i have a java script function which needs to be called Is there any way to implement the above mentioned requirement.
    Many thanks in advance..
    Sourav

    Hi!
    From OAF classes java doc:
    oracle.apps.fnd.framework.webui.OAPageBean
    A class for processing and rendering HTML pages, designed to be invoked from either a JSP page or a servlet.
    Allows you to:
    Validate a user's session and redirect to a login page.
    Set the servlet Response content type to the correct character set as defined by the ICX_CLIENT_IANA_ENCODING profile. (The character set should NOT be set in the JSP page ContentType declaration.)
    Parse a HTTP Request and initialize BC4J application modules and view objects. (For HTML post, apply the content of the submitted form parameters to view objects.)
    Render a HTML page header and body
    It has 2 metods:
    public void renderDocument()
    Renders the HTML document. This is the most common API invoked by JSPs or servlets, and is used to render both the HTML header and body.
    renderBody
    public void renderBody()
    Renders the HTML body only.
    I think you can decompile this class or get the source from oracle and add your javascript code into this method.
    When OA page rendered, your code would be added to avery page, i think
    But it's some kind of hack or something ;-)

  • Problem  in merging java script and java code

    hi,
    i want to merge java and javascript code but it is giving some surprising results.
    this is my code:
    <script language = "javascript">
    <%
    String query_result= "1";
    String buttontype="";
    buttontype=(String)session.getAttribute("buttontype");
    query_result = (String) session.getAttribute("query_result");
    out.println(query_result);
    if(buttontype!=null&&(buttontype.equals("submit")))
    out.println(buttontype);
    %>
    alert(<%=ka%>)
    </script>
    <%
    %>
    now if i'll move "<script language = "javascript">" to:
    <%
    String query_result= "1";
    String buttontype="";
    buttontype=(String)session.getAttribute("buttontype");
    query_result = (String) session.getAttribute("query_result");
    out.println(query_result);*/
    if(buttontype!=null&&(buttontype.equals("submit")))
    out.println(buttontype);
    %>
    <script language = "javascript">
    alert(<%=query_result%>)
    </script>
    <%
    %>
    then it prints correctly and gives alert "1" but if i'll change query_result="manish" then it is not giving alert also
    i don't know wht is happening
    plz help me out
    manish

    hi pgeuen,
    Thanx for ur reply
    now its working i have changed my jsp exp. tag to
    alert("\"<%=ka%>\"")
    and it is displaying correctly.
    and if i'll give the scripting tags in "if block"then it will work but till now i didn't get why i was not getting any output when the scripting tags covers the whole jsp code. i think we can mix java script and jsp in any way.
    well thanx a lot.
    manish

Maybe you are looking for

  • How to print password_grace_time message on login form

    hi, we are running our application on 6i there we have a login form . we have set profile for a user & we want to show password_grace_time message ( ora-28002 ) on his login form when he try to login in grace time. how can we do this? regards

  • TS1363 ipod is locked in the eject mode. Cannot connect or clear

    Charged my ipod nano, ejected, but now ipod is locked in eject mode. I can't get it to clear or re-connect to iTunes. Any suggestions on how to clear it?

  • Colors change in objects in both RGB and CMYK formats

    I've recently upgraded to CS6 and also to OS 10.8...  Im working in multiple Illustrator docs using a color of 100-87-32-32. When I change objects to that color by keying it in to the color pallete, it changes. If I click off, go away and come back t

  • Export from 10g import to 9i

    Hi All, what I need is - I want to export the 10g data and import the same to 9i database. I know that if we take the export using the 9i binaries ( client or db) we should able to do that, but I don't want to keep the 9i binaries only for this job.

  • Advanced Graphs option seems missing in JDeveloper 11G

    I am trying to do an exercise on "Data Visualization and Graphs in JSF". (http://www.oracle.com/technology/products/jdev/viewlets/11/) I have created a query on a table and am trying build a graph based on this query. When I try to build a graph in J