Apostrophe causes Java Script on Redirect Button to Fail

I am trying to pass a value containing an apostrophe in it (O'Connor) using a redirect button using the variable \&P510_NAME.\
The buttton works fine for any value/name without an apostrophe in it, but when it hits O'Connor, the button does not work.
I checked the forum and found the following entry of similar nature, however the fix described here:
1) Does not render the data properly in the table and other forms
2) Does not work
Re: JavaScript not working on oracle.hmtldb.com
How do I pass a variable containing an apostrophe on a redirect?

You can escape these characters using the escape javascript function,
escape('O\'Connor') -> O%27Conner.
In PL/SQL you can replace the quote using replace. And to be on the save side you could also encode the reserved characters for URL's:
utl_url.escape(replace(value,'''','%27'))

Similar Messages

  • Calling java script from a button

    Hi,
    I have a Form and I would like to let the end-user to confirm some action that was initiated by pressing a button. The best way would be to call Java script, but the button is an 'item' button and not a 'region' button - i..e it is placed between items and not above the region, like Save, Cancel etc.
    In case of 'item' buttons I do not have 'Optional URL Redirect' field where to place the javascript call.
    Tamas

    You can try this..
    Instead of using button
    Edit the Item to which you want to associate a button.
    Go to Element tab
    Under Post Element Text enter
    </ br> <a href="#" -onclick=call_me() class="t20Button">Click me</a>Note : you need to change class="t20Button", i'm using theme 20 and in that the look and feel of button is derive from t20Button.
    remove the hyphen before onclick ..
    Regards,
    Shijesh

  • Using Java Script With Item Button

    Hi All,
    please i want to know how can i call any java script function from an item button?
    i cannot find the "Action When Button Clicked" tab which is exist in a region button.
    Thanks in advance,
    Ola

    Hi,
    i am having a strange problem with java script
    i have defined the following commandlink in an af:table
    <af:commandLink
    text="lockUser"
    disabled="#{!bindings.lockUser.enabled}"
    id="cl1"
    partialTriggers="cl1"
    action="#{searchBean.lockUser}">
    <af:clientListener method="onlock1" type="click"/>
    </af:commandLink>
    I have defined the following java script function.
    <f:facet name="metaContainer">
    <af:resource type="javascript" >
    function onlock1(){
    if(confirm("Do you want to cancel")){return true;}
    else {
    return false;}
    </af:resource>
    </f:facet>
    when i click on the link, the dialog box appears asking if i want to cancel: when i press yes still the link action is activated. Kindly suggest where i am going wrong.
    the behaviour i need is to if cliked on yes then the link action does not activate and nothing happens. if i press any other button the link functionality should be activated and it should perform the locking functionality

  • Please help, 3D animation play button Java Script

    The U3D file embedded into the PDF contains 3 procedure animations
    I would like to add a play button for each procedure.
    But I do not see the Animation Objects in the model tree of the pdf and I do not know how to connect to these animations
    with JavaScript.
    I have tried with no luck:
    var _anim = scene.animations.getByIndex(0);
    scene.activateAnimation(_anim);
    _anim.currentTime = 0;
    runtime.play();
    Please show me how this is done with Java Script on a button.
    Thank you

    If you're controlling the 3D animation from a button on the PDF page you need to talk to the correct API.
    The easiest way to do it is to embed a function into the 3D annotation (using a .js text file) then call that function from your button.
    e.g. in the 3D script, use this:
    function playAnimation(i) {
    var _anim = scene.animations.getByIndex(i);
    scene.activateAnimation(_anim);
    _anim.currentTime = 0;
    runtime.play();
    Then on your button, use this:
    getAnnots3D(pageNum)[0].context3D.playAnimation(0);
    then the same for (1) and (2) on your other buttons.

  • Hiving out java script

    HI
    On my index.html page I have a load of bloated java script
    code from button rollovers.
    Am I able to move this to a seperates .js file.
    If so what are the drawbacks and how do I do it
    Ta
    Carlo

    Hi,
    yes, simply copy/paste the javascript stuff (e.g. functions)
    to a new file
    (which initially must be blank, that is, an emtpy file without
    any predefined e.g. html stuff or so !), which needs to be
    "saved as...", say, "myjavascripts.
    js" -- when doing so, please note that the original
    javascript start/end - tags surrounding your e.g. functions...
    <script language="JavaScript" type="text/JavaScript">
    <!--
    and
    //-->
    </script>
    must NOT be copied/pasted to the external file -- only the
    inherent javascript stuff, otherwise you´ll get some
    javascript errors !
    Your external .js - file needs to be included like this
    within the <head>...</head> - part of your document:
    <script type="text/javascript"
    src="path_to_your_script/myjavascripts.js"></script>
    >>
    If so what are the drawbacks?
    >>
    So far I didn´t have any bad experience with
    "outsourcing" javascripts.

  • URL Branch with java script  target fails, but works as button press

    I have a java script that displays a "report is loading" message when the page's submit button is pressed via the optional URL redirect attribute of the button.
    Unfortunately, I had to remove the optional URL Redirect so that I could perform some computations and processes as a result of the button press.
    I tried to put the script link in a branch attached to the button, but it failed with the following error.
    ERR-1777: Page 11 provided no page to branch to. Please report this error to your application administrator.
    Restart Application
    After the branch to the java script, there is an unconditional branch to page 11.
    Any one encounter this issue before and, if so, is there a work around?

    Hi
    Can you not use a URL redirect on the button to call your Javascript function - the Javascript will display the message you want to display, then call
    doSubmit('request_name');
    ...to submit your page, picking up all your processes/computations etc
    You then need to define a branch on your page which is conditional on the value of REQUEST - in this case request would be 'request_name'.
    regards
    Andrew
    UK

  • I'm all of a sudden getting a ( Java Script Application "download error" message) when trying to use Ant Video Downloader. What could cause this?

    When an FLV is playing and I want to download it. I click on the Ant download button. A little window appears reading ( Java Script Application "download error" message)

    This works for me on YouTube.
    Cancel the download and then immediately right click and choose retry.

  • SAVE AS BUTTON WITH JAVA SCRIPT FOR MOUSE UP EVENT

    Please any one help with complete code for "SAVE AS" button to auto save the acrobat form in a user specified path
    with unique name or incremental name.Please post only full script for MOUSE UP event.

    Thanks George but i need an example.my actual need is
    i have created a SAVE INVOICE button.i have set the action"Mouse up" to run a Java script.
    Now i need a scriprt for the same.
    If i press that SAVE INVOICE button.the fie should save on "C:\Users\MUNNA\Desktop" automatically
    with unique name and the name should not remain same for next Save.because it overwrites the previous
    file so please post an example pdf with same.

  • How to disable a button using Java Script in Apex

    Hi All,
    I was trying to disable a button when the value of a select list item in the same page is equal to zero. Following are the steps which I did.
    1) Created a new button template as <table class="t9StandardButton" id="#BUTTON_ID#" cellspacing="0" cellpadding="0" border="0" summary="">
    2) Changed the existing button template to the newly created button template.
    3) Added onchange="javascript:fdisplay(this);" to form element value of select list
    4) Added the following java script in the page header
    <script type="text/javascript">
    function fdisplay(some) {
    if (some.value==0){
    html_GetElement ('#BUTTON_ID#').disabled = true;
    else
    html_GetElement ('#BUTTON_ID#').disabled = false;
    </script>
    But the script doesn't work. Is there anything I am missing here. Please advice.
    Thanks,
    Vikas

    Vikas:
    In the 'Button Attributes' field of the button enter 'id='thisButton'.
    Modify the button template to include the substitution string #BUTTON_ATTRIBUTES# . This should be put in the anchor tag in the template defintion.
    Modify your Javascript to reference the above id as
    html_GetElement ('thisButton').disabled = true;
    ....Varad

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

  • 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

  • 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

  • Reg : show/hide subforms under buttons in Static page(Java Script)

    Hi All ,
    I am creating Adobe Interactive form(static page). In this page have 3 buttons.For each button one subform is there. I want to show/hide subforms under buttons.
    I am using javascript. Please give me the code for this.
    Thanks
    Risha

    Hi Risha,
    can you explain your question like do u have some condtions to show or hide the subform? OR if u click
    button you want to show the subform and by default subform should be hidden something like this?
    Normally for showing the subfrom on click of the button: (By default make your subform invisible from its properties).
    Select the button and in the click event select java script option and write the following code:
    Subform.presence = "visible";
    (*you have to give full path of the subform instead of only subform name).
    With Regards,
    Ravi

  • Error message: "Java Script turned off, Enable Java Script" How to do this? I have gone into "Tools--then Options--Then checked Java Script--Then the "OK/Save" Button but this has not helped. What is the right course of action?

    Java Script is disabled on my HP laptop. I have done the obvious things. It still will not enable Java Script. What do I try next?

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Java Script behind the Submit Button

    I have an existing pdf form which has a submit button. I need to alter the url embedded in the java script behind this submit button, so that upon submission it goes to a different location. I am not able to locate this java script. Can anyone please suggest how to find out the java script. Thanks in advance.

    Are you able to select the button in Acrobat and bring up the Field Properties dialog? If so, the script should be in a Mouse Up JavaScript action. If not, it could be that the form is Reader-enabled or secured, or is an XFA form created in LiveCycle Designer. It may have also been put through the Distribute Form process in Acrobat, in which case it will be Reader-enabled.

Maybe you are looking for

  • Can I copy music on an iPod to a "new" computer?

    I have a new computer and would like to copy the current music on my iPod to the new computer. Music was originally loaded from the old computer. Is there a way to transfer the files FROM the iPod to the new COMPUTER using iTunes? (iPod --> computer)

  • How do I update a JavaScript WebJob?

    I recently created and deployed a JavaScript based WebJob to my Azure website. I did this by zipping it and uploading it to Azure. It's working correctly. I don't see any way to update the job unless I delete the job and re-add it. When I go to my Az

  • RE:  case  283334456

    The support "help" system seems to be circular without resolution.  How do I ask a question related to an existing case?  I was sent an e-mail requesting fedback, but the system will not accept my reponse.  I was asked to fill out a pdf form, which I

  • When I enter events in my calendar to quickly, when it auto-syncs it will revert back to my old event.

    When I enter events in my calendar to quickly, when it auto-syncs it will revert back to my old event. If I have two calendars in use, if I use one (say red "home") and decide I want to change it to another (say green "work") it will revert back I've

  • Consumer-Proxy authentication via x.509 Certificate

    Hi experts, I want to consume a service from a erp system and authenticate via x.509 SSL Certificate. But in soamanager there is no checkbox for this authentication method when I create the logical port. Only u201CUser Id / passwordu201D and u201CSAP