JavaScript from the page as an argument element

It is a simple javascript function to remove the space on the P6_JOB_NAME text field

I want to move the agenda of the APEX page as an argument so that I can reuse this same javascript on several elements of the page function.

I tried several different ways, as below. But none of them works. No idea where I am going wrong?

1 work

function removeSpace() {}

job_name var = document.getElementById ('P6_JOB_NAME');

var input_str = job_name.value;

job_name. Value = input_str.replace (/ \s + / g, ");

}

in the text field...

onChange ='Javascript:removeSpace();'

2. does not work

function removeSpace (id) {}

job_name var = document.getElementById (id);

var input_str = job_name.value;

job_name. Value = input_str.replace (/ \s + / g, ");

}

in the text field...

None of these works

onChange = 'Javascript:removeSpace (this)';

onChange = 'Javascript:removeSpace('P6_JOB_NAME')';

Hi JonDaegu-Oracle

Try using the following code, I didn't test, but I think it will work

function removeSpace (id) {}

var input_str = id.value;

ID. Value = input_str.replace (/ \s + / g, ");

}

Concerning

Salim

Tags: Database

Similar Questions

  • When I return from the page of google search for a link then button does not return return

    When I return from the page of google search for a link, then button does not return back. Instead, the same page refills. I need to go back click back button twice or even more. How to fix? I cheked it it another browser and there is no such behavior. It seems completele Firefox problem.

    the problem was resolved after remooving extenshion «user agent overrider»

  • How to copy and paste text from the page of the book one photo to another.

    Hello, I downloaded this software 2 days ago, and I had so much fun with it. pls I need help on how to copy and paste text from the page of the book one photo to another. Second, how to copy my photo book completed pages project to another laptop computer for printing. Thank you

    Wow! I solved the first problem, I clicked on 'ctrl c' to copy and "ctrl v" to paste. yipppppeee! now am loving this software d most just need help with the second question now

  • HP envy 5530 Wireless: print only on the left excluded from the page. The right part shows a gray rectangle. Preview looks right

    My new printer works, but although I've marked the parameters for the letter and print preview appears correct, that the printed pages are coming on only the left excluded from the page.  On the right 1/3, there is a gray rectangle.  I really need to fix.

    Thanks again for your response.  It turned out that the printer was not to blame.  I was using the word 2016 and he had a setting of markup that was running.  When I turned is disabled, gray Panel went out.  Unfortunately, he seems to be the default setting and returned.  But until I figure out how to fix I just check the section of markup on the Ribbon and make sure it is off.

  • How to obtain the page to an XML element?

    Hi all

    I am fairly new to InDesign scripting (and scripts in general) and have lots of fun :-)

    I have an InDesign document containing several frames (texts, graphics, etc.) and I tagged using the InDesign tags window.

    After much struggle, I managed to get the name of the XML element tag first in my document using this simple code:

    app.activeDocument.xmlElements[0].xmlElements[0].markupTag.name
    

    I know that it worked because I got the right answer in the Javascript console. (By the way, can someone explain to me why I write xmlElements [0] twice?) And what is the difference between xmlElements and xmlItems? Any help is appreciated).

    Then I'll probably use a loop for for each markupTag of each xmlElement. But I have a lot of trouble to obtain the page associated xmlElement :-/

    After a lot of searching on Google, I came across this article which is supposed to answer my question exactly. I tried to understand this code, copy and paste in ExtendScript, but I must admit it's a bit too complex for me...

    Can someone tell me how to get a graphic or a text linked to my XML tags block? Any help is greatly appreciated!

    Nevermind, I found an easier way to achieve what I was trying to do. Actually, I wanted to be able to handle different images in my document, so why I wanted to use the XML markup.

    For those of you who have the same problem, who knows from InDesign CS5, there is an itemByName method that allows you to select an image by its name in the layers panel. So much easier to use :-)

    Thread closed!

  • problem with javascript in the page jspx

    Hello

    using the last jdev from RTO 11 g.

    I'll have more javascript which works fine if I try out jdev using a html file but fails when I run the page with the error:
    OracleJSP error: oracle.jsp.parse.JspParseException:
    Error: oracle.xml.parser.v2.XMLParseException (/ adflib/myapp/setup/ui/page/CloseBrowser.jspx):
    [Line no.: column 37 #: 28: name expected instead of].


    JavaScript:

    < af:resource type = "javascript" >
    function getCompId (name) {}
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); "
    regexS var = ' [------? &] ' + name + ' = ([^ & #] *)';
    var regex = new RegExp (regexS);
    results var = regex.exec (window.location.href);
    If (results == null) return "";
    otherwise return results [1];
    }
    < / af:resource >

    Hello

    JSPX is a strict xml page... the problem is that your function has a few characters that are interpreted as part of the xml...
    As far as I know using & in xml are not valid... you use & amp; instead...
    so, you should try including your script inside cdata like this

    
    
  • Remove the button from the Page

    I have a form that is mainly used in Adobe Reader and designed in Live Cycle Designer ES 8.2.  I created a button "Insert Page" that allows users to reproduce or insert additional pages if necessary.  However, I would like to have a button that allows the user to also delete the page if it is not necessary.  The the button script that I use to insert the page is as follows:

    Form1. Page5.button1 [0]: click - (JavaScript, both)

    Form1. Page5.instanceManager.addInstance)

    I thought maybe I could just create another button and instead of "addInstance", I just have "removeInstance" but that does not work so I was wondering how this can be done?

    Any help appreciated.

    Hello

    The addInstance has a parameter 'true' or '1', for example:

    form1.Page5.instanceManager.addInstance(1);
    

    This will add another instance of Page5.

    Now when it comes to removeInstance, the parameter you need is the instance number you want to delete, based on the system of numbering from scratch. For example if there are three instances of page 5, these are numbered Page5 [0], page 5 [1] and on Page5 [2]. This script deletes so everything initially:

    form1.Page5.instanceManager.removeInstance(0);
    

    If there is a button on the Page 5 to delete the page, you can pass this.parent.index as a parameter.

    form1.Page5.instanceManager.removeInstance(this.parent.index);
    

    However keep in mind that if the button is in subforms you will need several 'parent' to get on Page5: this.parent.parent.parent.index.

    Hope that helps,

    Niall

  • Where is the Refresh command from the page menu of Firefox on Mac?

    Cmd + r used to refresh the pages for me, but for some reason any stopped working in Firefox. It's pretty easy remap the command to a menu item, but the item menu to refresh page in Firefox is gone! It has been under notice. I looked in all the menus, but the Refresh command seems to have been deleted. Of course, I use the icons, but it's just bulky.

    I can't see how to close a question. CTRL + R has started working again, so I would like to mark this as resolved.

    That said, as a suggestion for the development of Firefox, I recommend to get away from the idea of the menu Burger - one of the worst DCP interface of all time in my humble OPINION!

  • Firefox will not load a Web site if the assets are missing from the page

    Some sites Web page can try to include a CSS or JS asset that is missing. In this case, Firefox 30 seems to hang and the page never loads. This happens even in Safe Mode. Other browsers have no problem loading these pages.

    I can give you two example URL, as well as the missing assets which causes the problem, but I don't know if I'm supposed to post links or not.

    Please do not take into account. After returning from safe mode, it offers to reset everything and import my data. Once the browser has been reset, well not loaded loading pages.

  • linking directly from the page of the muse to the subdirectory outside the muse.

    I have a Muse site with pages, assets, etc. to the normal root level. I have a subdirectory below the files, (root)/subdirectory/testpage.html, that have been downloaded to this subdirectory out of the muse.

    I can set a link to subdirectory/testpage.html in a page of muse, and it is not marked as an error.

    When I download the page the link works as expected and that it shows testpage.html

    This is not documented anywhere I can find. Since it is not documented, if I use it in my site is likely to be removed in a future version? This is a feature not documented, or is he never considered a bug?

    For the phrase it differently: this is the design philosophy of Muse "all that is not expressly prohibited is permitted" or "all that is not expressly permitted is forbidden"?

    You can link to any valid address outside your site from a site of Muse generated, if permissions allow.

  • How to send data from the Page with a form to fill out?

    How can I automatically include the page title or any text in my Web page when my client click on the Submit button in a form to fill out?

    This may seem obvious, but if you want to receive data from a form, and then place it in the form. A hidden form field with the title page and the text of your Web page will send these data on the form submission.

    best,

    Shocker

  • Use of javascript within the page fragment

    Im trying to use javascript code within a fragment of a page with the tag

    AF:resource

    But the second time the page reloads I got this error: "ReferenceError: works is undefined"

    <af:resource type="javascript">
          function funciona() {
              alert(123);
          }
    </af:resource>
    

    IM using JDeveloper 12 c

    Check the 'witch hunt during the use of JavaScript in the regions of the ADF' in this document http://www.oracle.com/technetwork/developer-tools/adf/learnmore/march2012-otn-harvest-1571998.pdf

    Timo

  • Problem with onload javascript in the page of the apex

    I want to run some javascript by their SUMMIT when the user loads the page, but I can't get the onload function to work. I'm new to javascript, so it's probably a simple error on my part.

    All I want to do is to change the background color of a field (P5_GRPT) based on the value of another field (P5_MIN_DAYS). I just want something basic that works so I can build on that and make it more elegant/generic, but at the present time, the script below seems to have no effect. Any help would be appreciated. I put the focus of cursor attribute to ' don't focus not cursor ' (Apex version 3.01.00.12)

    Header html page:
    <script type="text/javascript">
    Function trafficlight()
    {
    c = document.getElementById("P5_MIN_DAYS").value;
    switch(c)
    {
    case 1:
    $x("P5_GRPT").style.backgroundColor = "green";break;
    case 2:
    $x("P5_GRPT").style.backgroundColor = "yellow";break;
    default:
    $x("P5_GRPT").style.backgroundColor = "red";break;
    }
    }
    </script>
    The body of the html page:
    onload="trafficlight();"

    Hello

    I think that the value of your item is interpreted as a string, not as a number.

    Try this:

    function trafficlight() {
      c = parseInt(document.getElementById("P5_MIN_DAYS").value);
    
      switch(c) {
        case 1:
          $x("P5_GRPT").style.backgroundColor = "green";break;
        case 2:
          $x("P5_GRPT").style.backgroundColor = "yellow";break;
        default:
          $x("P5_GRPT").style.backgroundColor = "red";break;
      }
    }
    

    Hope this helps,
    Dirk

  • Call an HTML page directly from the page of the OFA.

    Hello
    I have a customer requirement to call an HTML page directly from my page of the OFA. The HTML page is the home page of their business and in my OAF page whenever the Cancel button will be squeezed user will be redirected to the HTML home page.
    Is someone can you please tell me how I can get this feature.

    Thank you
    Lucile

    R11 I have pageContext.sendRedirect (url) of the user; to achieve this.

    Kind regards
    Out Sharma

  • How to get values page, component and menu of Peoplesoft from the page?

    Hi all

    We used Peopletools 8,4 x previously where it is used to make a comment on the page of peoplesoft something of this form:

    <!--IE/6.0/WINNT; ToolsRel = 8.44.17; Page = INV_ITEMS_DEFIN1; Component = ITEMS_INQUIRY; Menu = DEFINE_ITEMS; User = VP1; DB = PSFT844/ORACLE; AppServ = / / INSIGHTVMPS2:9000; ->

    We had set some debug and trace options in the configuration of the web profile, as shown in the picture as an attachment to get this comment. We have improved at 8.54, and we don't get these values in the commentary. Is there anyway that we can retrieve these values? Any help in this area would be extremely useful.

    Psoft.png

    So when you press Ctrl + J or Ctrl + J twice on the page, nothing happens?

    You use IE9?

    Try Ctrl + Shift + J

Maybe you are looking for

  • iPhone 4 and iOS 8 apps

    I have an iPhone 4. I am very aware that my phone will not update to iOS 8. I had an application that has been used frequently, but is now available for me because it has updated to iOS8 and more. Is there a way to get back on this app? Or maybe it's

  • Lenovo A820 gels

    Hi all Randomly, Lenovo A820 freezes and recharge during calls. This problem happens about twice a day. I reset the phone to default settings, but the problem is back. I have attached the anr file and the output of the dmesg command. ANR 2013.08.11 1

  • Browsers are too slow - need help

    Hello Suddenly, since a few days - my browsers [Safari & Chrome] becomes too slow... I even deleted the history too I need assistance her please Yet one thing... is there any photo editor/Paint Brush in iMAC... applications data? See you soon Pruthvi

  • XP does not start at the logon screen

    Original title: XP will not boot: When I try to start Windows XP, the computer stops responding it hangsup lack of a better word with a black blank screen immediately after that the windows logo splash screen is complete. Usually after the logo splas

  • Send fast: method for CC to an E-mail address?

    Hi allIs there some way I can CC (the seller's email address) in the flesh live email?Thank youRama