Java Script (Help Required)

We are using the following code in HTML Header of the page
//replaces the enter key with the tab key
document.onkeydown = function ()
if (event.keyCode == 13)
event.keyCode=9;
</script>
We want to execute this code when current Item is not :P3_REMARKS (which is text area)
Regards
Jazib

example of a name of an item
About Referencing Items Using JavaScript
When you reference an item, the best approach is to reference by ID. If you view the HTML source of an Oracle HTML DB page in a Web browser, you would notice that all items have an ID attribute. This ID corresponds to the name of the item, not the item label. For example, if you create an item with the name P1_FIRST_NAME and a label of First Name, the ID will be P1_FIRST_NAME.
Knowing the item ID enables you to use the JavaScript function getElementById to get and set item attributes and values. The following example demonstrates how to reference an item by ID and display its value in an alert box.
<script language="JavaScript1.1" type="text/javascript">
function firstName(){   
alert('First Name is ' + document.getElementById('P1_FIRST_NAME').value );
// or a more generic version would be
function displayValue(id){   
alert('The Value is ' + document.getElementById(id).value );
</script>
// Then add the following to the "Form Element Attributes" Attribute of the item:
onChange="javascript:displayValue('P1_FIRST_NAME');"
Kind regards,
Iloon

Similar Messages

  • I'm note a firefox geek, but ever since my friend told me to install NoScript I can not access my msn and hotmail page. It tells me that Java Script is required, what ever that is. What do I do next. Do I uninstall the No Script. Thanks Ed

    I'm note a firefox geek, but ever since my friend told me to install NoScript I can not access my msn and hotmail page. It tells me that Java Script is required, what ever that is. What do I do next. Do I uninstall the No Script. Thanks Ed edit
    Details

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • Urgent !!! - Java script help for events in adobe form

    Hi ,
    We have requirement  where we have 5 buttons on interactive form which will retrive data from R/3 system .
    1) How can i distingish the event of each button  ?
    For Ex : We have 5 buttons namely , GetPlantcode , GetStatus, SubmittpSAP etc..
    We hav only 2 events on adobe form - Submit to SAP and SAPCheckFields.
    Please let me know some alternative by which i can sent some variable to webDynpro which distinguishes them.
    2) How to set a value for the context variable on button click event ?
    Ex : I have a context node ( data node ) bind to adobe interactive adobe component on a webDynpro application. If i want to set Selectindicator ( value attribute in data Node ) a value on a button click , Please let me know the java script how i can do this.
    Happy New Year for all
    Nanda

    Hi ,
    We found one work around for this. It seems to solve our issue for now.
    Set a text field on adobe and try to set it with some value in each button click. We can get retrived that value in webdypro application through context bind value node to text field.
    Using the value in the value node we have applied different logic in same event submit to SAP.
    Nanda

  • Java Scripting help

    Hello. I am new to java, as well as still somewhat a newbie on mac. I was wondering if there is a free program out there, or on my mac, that would allow me to write java and then check it for errors? Preferably something for slower peeps like me. Also if there is a general javascript library with the basic scripts most commonly used so I can get a better idea of how to write the script? Thanks in advance!

    Hi,
    Go here: Introduction to Apple JavaScript Coding Guidelines
    Java Script Basics
    New to Mac? Getting Started on a Mac
    Switching from Windows? Switch 101
    Carolyn

  • Issue in running eCATT Scripts  - Help required very urgently

    Dear All,
    We are running the eCATT scripts from Solman 7.0 by connecting it to ERP system R/3 4.6C. While running the scripts, we are facing some issue.
    1. If we try to run the scripts then those are getting failed. The same scripts if we run after some time with out changing any code then those are running fine.
    We are frequently facing this probelm.
    Could you please let me know the solution. Your help is really appreciated.
    Thanks,
    Mahendra
    Moderator Message: Urgently word is not allowed in this forum. Open a new thread without the "priority" word.
    Edited by: kishan P on Sep 6, 2010 11:18 AM
    Edited by: kishan P on Sep 6, 2010 11:21 AM

    Dear Ananth,
    Scripting is getting failed at different lines of code at different runs.
    Thanks,
    Mahendra

  • Java Script Help

    Hello!
    Can any one help me with this script. I want to center my web
    page when the
    window is opened window.moveTo command helps me to position
    the webpage but
    how do I find screen size and center it.
    <script LANGUAGE="javascript">
    window.moveTo(100,2);
    window.resizeTo(1024,768)
    </script>
    Thanks
    Dhananjey

    Good luck!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Dhananjey Singh" <[email protected]> wrote in
    message
    news:[email protected]...
    > Thanks !
    > It worked well. I am trying to learn CSS, but some how
    the application is
    > not clear.
    > Thanks a lot
    > Regards
    > Dhan
    >
    > "Murray *ACE*" <[email protected]>
    wrote in message
    > news:[email protected]...
    >> Why do it that way at all? It's so easy with CSS,
    and will still work if
    >> js is disabled....
    >>
    >> It depends on whether you are using absolute
    positioning on the page, as
    >> to
    >> which method might be best, but in either event,
    this will work -
    >>
    >> Change this -
    >>
    >> </head>
    >>
    >> to this -
    >>
    >> <style type="text/css">
    >> <!--
    >> body { text-align:center; }
    >> #wrapper { text-align:left; width:760px; margin:0
    >> auto;position:relative; }
    >> /* 760px will display on an 800px screen maximized
    browser window without
    >> */
    >> /* horizontal scrollbars. */
    >> -->
    >> </style>
    >> </head>
    >>
    >> change this -
    >>
    >> <body ...>
    >>
    >> to this -
    >>
    >> <body ...>
    >> <div id="wrapper">
    >>
    >> and this -
    >>
    >> </body>
    >>
    >> to this -
    >>
    >> <!-- /wrapper -->
    >> </div>
    >> </body>
    >>
    >> and see if that helps.
    >>
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "Dhananjey Singh" <[email protected]>
    wrote in message
    >> news:[email protected]...
    >>> Hello!
    >>> Can any one help me with this script. I want to
    center my web page when
    >>> the window is opened window.moveTo command helps
    me to position the
    >>> webpage but how do I find screen size and center
    it.
    >>>
    >>> <script LANGUAGE="javascript">
    >>> window.moveTo(100,2);
    >>> window.resizeTo(1024,768)
    >>> </script>
    >>>
    >>> Thanks
    >>> Dhananjey
    >>>
    >>
    >>
    >
    >

  • CS5 slideshow java script help please

    My slide show only plays thru once and I would like to have it run more than once..also I have only 8 images and would like to increase this... can someone lend a hand please..  here is the script, it was developed out of dreamweaver suite 8 but now I am in CS5:
    <script type="text/JavaScript">
    <!--
    function MM_timelinePlay(tmLnName, myID) { //v1.2
      //Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Macromedia, Inc. All rights reserved.
      var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false ;
      if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
      tmLn = document.MM_Time[tmLnName];
      if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
      if (myID == tmLn.ID) { //if Im newest
        setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
        fNew = ++tmLn.curFrame;
        for (i=0; i<tmLn.length; i++) {
          sprite = tmLn[i];
          if (sprite.charAt(0) == 's') {
            if (sprite.obj) {
              numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
              if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
                keyFrm=1;
                for (j=0; j<sprite.values.length; j++) {
                  props = sprite.values[j];
                  if (numKeyFr != props.length) {
                    if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                    else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
                  } else {
                    while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                    if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                      if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                      else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
          } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
          if (fNew > tmLn.lastFrame) tmLn.ID = 0;
    function MM_initTimelines() { //v4.0
        //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
        var ns = navigator.appName == "Netscape";
        var ns4 = (ns && parseInt(navigator.appVersion) == 4);
        var ns5 = (ns && parseInt(navigator.appVersion) > 4);
        var macIE5 = (navigator.platform ? (navigator.platform == "MacPPC") : false) && (navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4);
        document.MM_Time = new Array(1);
        document.MM_Time[0] = new Array(1);
        document.MM_Time["myhat1"] = document.MM_Time[0];
        document.MM_Time[0].MM_Name = "myhat1";
        document.MM_Time[0].fps = 3;
        document.MM_Time[0][0] = new String("sprite");
        document.MM_Time[0][0].slot = 1;
        if (ns4)
            document.MM_Time[0][0].obj = document["Image1"];
        else if (ns5)
            document.MM_Time[0][0].obj = document.getElementById("Image1");
        else
            document.MM_Time[0][0].obj = document["Image1"];
        document.MM_Time[0][0].keyFrames = new Array(1, 17, 34, 54, 73, 92, 111, 130);
        document.MM_Time[0][0].values = new Array(1);
        document.MM_Time[0][0].values[0] = new Array("../Images/slideshow/1.jpg","../Images/slideshow/2.jpg","../Images/slides how/3.jpg","../Images/slideshow/4.jpg","../Images/slideshow/5.jpg","../Images/sl ideshow/6.jpg","../Images/slideshow/7.jpg","../Images/slideshow/8.jpg");
        document.MM_Time[0][0].values[0].prop = "src";
        document.MM_Time[0].lastFrame = 130;
        for (i=0; i<document.MM_Time.length; i++) {
            document.MM_Time[i].ID = null;
            document.MM_Time[i].curFrame = 0;
            document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    //-->
    </script>

    gayathri_bna wrote:
    Im in a hurry. As a suggestion...find someone locally and pay them to fix your computer.
    This site is for programming java not for fixing computers.

  • Killing a Java process.Help required.

    Hi,
    I have some java background processes running in a Linux env.
    I tried killing these,but they arent being killed.
    ps -ef | grep java
    fix1     13193 13184  0 09:05 ?        00:00:05
    java -mx256M -classpath :../lib/lServer.jar:../lib/Core.jar:../lib/FilePersistence.jar:../lib/RMIAdapter.jar com..universalserver.UniversalServer -id
    i_APPLICATION -xmlconfig ../config/config..boa.xml -nogui
    I used:
    kill 13193
    but process is not being killed.
    I know this is a Java Forum but please can anyone help?

    kill -9 pidLOL straight in there with the old bludgeon :-)

  • Shell script help required

    hi
    scenario: A folder contains n - number of folder which contains few generated pdf reports.
    NOW I need a shell script which will solve two purpose simultaneously:
    1. it will create folder for each folders in the specific directory according to the month and year AND it will copy the respected folder within them including the pdf files.
    2. The newly created folders will be converted into a tar compressed file.
    EXAMPLES:
    Say the folder name is E-SEVA wich contains folders say 10_MAR_2011,12_MAR_2011 and n_YthMonth_2011 and same for 2012 year also.Now I need folders rather a tarz file for each month say MARCH_2011,FEB_2011,MARCH_2012,FEB_2012 and so on.
    kind regards

    The following should do:
    months="JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC"
    years="2011 2012"
    dir="E-SEVA"
    cd "$dir"
    for month in $months; do
       for year in $years; do
          for folder in $(find . -type d -name "*_${month}_${year}"); do
             mkdir -p "${month}_${year}"
             cp -pR "$folder" "${month}_${year}/"
             tar -rf "${month}_${year}.tar" "${month}_${year}"
          done
       done
    doneNote: You cannot add files to a compressed archive.

  • Script Help required to Auto-populate the Time Period Value

    Hi Experts ,
                    Time Period object was defined in System
    I have a collection M_ED_SYS_CE with M_ED_YR as collection field .
    M_ED_YR field is a Time Period Picker (i.e. values are like "Year 2011" , Year 2010)
    my requirement was to auto-populate the M_ED_YR collection field with Time Period object . No manual Interruption
    Also I need to increment and auto-popualte & set  the Time Period values for all  existing M_ED_YR Collection fields .
    Can any one please clarify if TimePeriod objects defined in System is of VLV type or String Objects
    Any suggestions are highly Apprecaited .
    thanks in Advance
    Tayi

    REsolved

  • I  need a Java script  help

    I need a javascript that I can put a list of picture urls in and it
    will be
    timed to fade into the next picture. I don't want just a rotating one
    it
    must fade into the next picture to look good. Very easy project

    I don't think you can do fading and rotating of
    images in Javascript anyway.Sounds like one of those godawful Flash thingsthat
    websites make you watch before you can get to the
    useful stuff.I hate those.
    My company's website is rife with them. System
    testing is a major PITA. I can only imagine how
    frustrating it must be for a customer who doesn't
    have broadband.My company also loads up the corporate site with this trash. We don't employ any web developers, so they brought in some "consultants" to do it for us.
    Every time I have to watch it, I'm reminded of the four straight years I went without a pay raise. Turns my stomach.

  • Jquery or java script help

    The website icrossing.com
    What code did they use and where did they put it?  I cant figure this one out??

    This is a very advanced web site.  I can't in good conscience tell you how to copy a Hearst owned web site. 
    All I can tell you is that you must know code fundamentals in order to produce advanced level results.  
    http://w3schools.com/
    Start with something less ambitious -- a basic page layout with a jQuery Slider, for example.
    Nivo Slider
    http://nivo.dev7studios.com/features/
    Nivo Slide Tutorial
    http://nivo.dev7studios.com/support/jquery-plugin-usage/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • How to write Java script for refering the 1st page text field from 2nd page?

    Hello I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy is,
    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    Now, i have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "Value_ABCD", THEN the 'Text_Field_B_1' of page_2 should be 'readOnly'. Pls let me know Wht is the Java script for this requirement?

    if (xfa.event.newText=="ABCD")
    VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";
    place script on change event of Text_FieldA_2

  • Help required in Java Script

    As far as I know the variables that are used inside java script program are declared using var keyword.
    Suppose I assign in the following manner,
    var str="Hello";
    Is there any way I can using the String functions that java.lang supports . I want to do validaition at the client side. Therefore I assume there is no mandatory requirement , that the client has anything java on his system.

    Javascript already supports many of the java.lang functions, eg, substring(start, stop), length, splice, split, etc.
    Just remember your using Javascript so there may be variations with methods and signatures.
    Have a look at either Netscapes or Microsofts Javascript reference.
    Anthony

  • Help needed for Time Calc Java Script

    Hi,
    I am trying to create a timesheet in PDF and have hit a speed bump. Is there anyone there who could provide me with a script that calculated the difference between 2 times? (Field2 time)-(Feild 1 Time) = Duration.I am desperate and have tried everything.
    I proccess the payroll for a company and all of the 500 or so timesheets that I received each fortnight are paper copies and I am pulling my hair out. I need to use Adobe forms (We have Adobe Pro 9 and I am using the XML forms, not live cycle) as the serach engine that we use for emails cannot search on excel documents.
    I have no Java script experience and I am getting completely lost in the subject. Any help would be greatly appreciated.
    Thanks anyone who can help at all.
    -Sohnia

    hi friend here example for time calulation start and end time example..<br />just copy and paste then run it ur browser.<br /><br /><HTML><br /><script language="JavaScript"><br /><!--<br /><br />var h1 = 1;<br />var h2 = 2;<br />var days = 0;<br />var m1 = 1;<br />var m2 = 2;<br />var am1 = 1;<br />var am2 = 2;<br />function findtime(h1,h2,days,m1,m2,am1,am2)<br />{<br />var answer = "why";<br />var mdiff = 1;<br />var hdiff = 2;<br />pdays = parseInt(days);<br />ph1 = parseInt(h1);<br />ph2 = parseInt(h2);<br />pm1 = parseInt(m1);<br />pm2 = parseInt(m2);<br />if(am1 == 2 & ph1 < 12) ph1 = ph1 + 12;<br />if(am2 == 2 & ph2 < 12) ph2 = ph2 + 12;<br />if(am1 == 1 & ph1 == 12) ph1 = 24;<br />if(am2 == 1 & ph2 == 12) ph2 = 24;<br />if(am1 == 2 & am2 == 1 & ph2 < 24) ph2 = ph2 + 24;<br />if(am1 == am2 & ph1 > ph2) ph2 = ph2 + 24;<br />if(pm2 < pm1){<br />pm2 = pm2 + 60;<br />ph2 = ph2 - 1;<br />}<br />mdiff = pm2 - pm1;<br />hdiff = (ph2 - ph1) + (pdays * 24);<br />if(hdiff == 0) answer = mdiff + ' minutes';<br />else if(hdiff == 1) answer = '1 hour and ' + mdiff + ' minutes'<br />else answer = hdiff + ' hours and ' + mdiff + ' minutes'<br />return answer<br />}<br /><br />//--><br /></script><br /></HEAD><br /><br /><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><br /><BODY BGCOLOR=FFFFFF TEXT=000000 LINK=0000FF VLINK=800080><br /><br /><div align="center"><table width="950" border="0" cellpadding="0" bgcolor="#899194" cellspacing="0"><br /><br />  <br /><tr><td valign="middle" width="33%"><br /><br /><center><br /><form><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR=#FFFFFF><br /><!--ROW 1--><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR="#B6D4D2"><br /><!--ROW 1--><br /><td colspan=4><br /><center>Time Between Times Calculations - Multiple Days</center><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Required Data Entry<br /></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><br /><td align="center">Start time</td><br /><td align="center"><input type="text" name="hour1" size="5"></td><br /><td align="center"><input type="text" name="minute1" size="5"></td><br /><td align="center"><select name="period1"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><tr><br /><td colspan="3">    Add Complete Interim Days</td><td align="center"><input type="text" name="adays" size="5" value="0"></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><td align="center">End time</td><br /><td align="center"><input type="text" name="hour2" size="5"></td><br /><td align="center"><input type="text" name="minute2" size="5"></td><br /><td align="center"><select name="period2"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan=4 BGCOLOR="#B6D4D2"><br /><input type="button" value="Calculate" <br />onclick="h1=form.hour1.value;<br />h2=form.hour2.value;<br />m1=form.minute1.value;<br />m2=form.minute2.value;<br />days=form.adays.value;<br />am1=form.period1.options[period1.selectedIndex].value;<br />am2=form.period2.options[period2.selectedIndex].value;<br />if(h1 < 0 | h1 > 12) alert('Your start hour is not valid');<br />else if(h2 < 0 | h2 > 12) alert('Your end hour is not valid');<br />else if(m1 < 0 | m1 > 59) alert('Your start minute is not valid');<br />else if(m2 < 0 | m2 > 59) alert('Your end minute is not valid');<br />else form.answer.value=findtime(h1,h2,days,m1,m2,am1,am2);"><br />   <br /><input type="reset" value="Clear Values"><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Calculated Results<br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan="4"><br />Time Difference <input type="text" name="answer" size="40"><br /><tr><td>[email protected]</td></tr><br /></td><br /></tr><br /></table><br /></form><br /></td><br /></tr><br /></table><br /><br /></center><br /></td><br /></tr><br /></table><br /></center><br /><br /></TD><br /></TR><br /></TABLE><br /></BODY> <br /></HTML>

Maybe you are looking for