Java Script Disable/Enable Items Problem

Hi,
I followed the directions to disable/enable items from http://www.oracle.com/technology/products/database/htmldb/howtos/htmldb_javascript_howto2.html#disable.
And I'm getting an error.
I have fields like :
Issue Summary
Issue Description
Identified By
Identified Date
Status (Values: Open, On-Hold, In-Process, Closed)
Priority
Target Resolution Date
Whenever the Status changes to 'In-Process' I would like to disable 'Issue Summary and Issue Description'.
Both the fields (Issue Summary and Issue Description) are being disabled when the Status changed to 'In-Process'
but when I click the 'Apply Changes' button I'm getting the error: 'Issue summary cannot be null.'
I do have a Not Null validation on Issue Summary field, but I'm only updating the Status field.
Following is the JavaScript:
In the Page Attribute (HTML Header)
<script language="JavaScript" type="text/javascript">
<!--
//htmldb_delete_message='"DELETE_CONFIRM_MSG"';
//-->
// This function takes in:
// 1. A string expression to evaluate. For example:
// 'document.getElementById(\'P125_STATUS\').value=InProcess'
// Notice the quotes are escaped using a "\"
// 2. One or more arguments which are item ID's as strings. For example:
// ...,'P1_ENAME','P1_SAL'...);
// Notice the ID's are the item names, NOT item labels
function disFormItems(testString,P125_ISSUE_SUMMARY,P125_ISSUE_DESCRIPTION){
theTest = eval(testString);
if(theTest){
for(var i=1;i<4;i++){
if (arguments){
disItem = document.getElementById(arguments[i]);
// disItem.style.background = '#cccccc';
disItem.disabled = true;
else{
for(var i=1;i<4;i++){
if (arguments[i]){
disItem = document.getElementById(arguments[i]);
disItem.disabled = false;
// disItem.style.background = '#ffffff';
//-->
</script>
In the Footer:
<script language="JavaScript1.1" type="text/javascript">
disFormItems('document.getElementById(\'P125_STATUS\').value==\'In-Process\'','P125_ISSUE_SUMMARY','P125_ISSUE_DESCRIPTION');
</script>
In the Status field HTML Form Element Attributes:
onChange="javascript:disFormItems('document.getElementById(\'P125_STATUS\').value == \'In-Process\'','P125_ISSUE_SUMMARY','P125_ISSUE_DESCRIPTION');"
Can somebody let me know what's wrong?
Any help is greatly appreciated.
Thanks in advance

FYI: I used the following JavaScript to make it work:
In the Header Text
function SetReadOnly()
var status = document.forms[0].p_t09.value;
if(status == 'In-Process')
document.forms[0].p_t02.readOnly = true;
document.forms[0].p_t03.readOnly = true;
//-->
In the Footer
<script language="JavaScript1.1" type="text/javascript">
SetReadOnly();
</script>
In the HTML Form Element Attributes
onChange="javascript:SetReadOnly();"
Thank you very much for your suggestion

Similar Messages

  • Jave script to enable and disable items

    Can any one tell me some sites that has used java script to enable and disable items.
    My target is to enable/disable an LOV and a text area when I press a button.

    You could check this example out.
    http://htmldb.oracle.com/pls/otn/f?p=11933:65:54438924816002::NO:RP
    Set the drop-down items to -1 to disable the text areas and any other value to enable them.

  • "Java Script Disabled on your browser. Please Enable it."

    I tried to log-in to this site:
    "http://www.edudel.nic.in/mis/MisAdmin/frmMisLogin.aspx"
    but instead got this message:
    "Java Script Disabled on your browser. Please Enable it."
    I have already enabled JavaScript in settings, but it gives the same error. When I tried doing the same in Internet Explorer (v9), everything was working fine. Please tell me what to do.

    The problem is there's a glitch in the javascript of http://edudel.nic.in/mis/MisAdmin/frmMisLogin.aspx
    There's a form element with an ID of "txtpassword", but in their validation function, they call it with getElementById("txtPassword"). Obviously a case issue, but it apparently works in IE.
    I created a workaround for a user I met in #firefox, a simple greasemonkey script that replaces the function with a fixed version.
    Here's the link:
    http://userscripts.org/scripts/show/102156

  • It gives message that "Java Script Disabled on your browser. Please Enable it." but it is allready enabled what should i do

    While browsing "http://edudel.nic.in" this site when we enter id and password it gives message"Java Script Disabled on your browser. Please Enable it." but it is allready enabled in Tools-> Options-> Content window

    The problem is there's a glitch in the javascript of http://edudel.nic.in/mis/MisAdmin/frmMisLogin.aspx
    There's a form element with an ID of "txtpassword", but in their validation function, they call it with getElementById("txtPassword"). Obviously a case issue, but it apparently works in IE.
    I created a workaround for a user I met in #firefox, a simple greasemonkey script that replaces the function with a fixed version.
    Here's the link:
    http://userscripts.org/scripts/show/102156

  • My JavaScript already Enabled but my bank site shows me java script disabled and am not able to transfer my fund online

    I have alrady enabled java script but my bank website prompt me that java script disabled so for thesame am not able to pay or transfer my funds online.

    Java and JavaScript are not the same thing. To ensure the JavaScript is enabled, go to the Options dialog and select the Content panel and make sure that "Enable JavaScript" is selected. There are add-ons that can block JavaScript, if you have an add-on such as NoScript, make sure that it has not blocked your bank site.
    If you are still having problems, try running Firefox in [[safe mode|Firefox safe mode]], this will disable add-ons and can be used to see if an ad-on is causing the problem. If it works in safe mode, follow the procedure in the [[Troubleshooting extensions and themes]] article to identify which one is doing this.

  • How to chcek if Java Script is enabled for the browser

    Hi all,
    I wanted to know if there was any way to check if Java Scripts is enabled in the browser on which the jsp screen is being displayed. This type of check should be in Java and im working on a struts framework.
    Thanks

    There are multiple ways of doing it. Depends on wether you need this information only at the Client (browser) or do you need it at the Server.
    In case of Client its trivial. You could do it in HTML:
    <div id="jsEnabled" style="visibility:hidden">
    JavaScript is enabled
    </div>
    <div id="jsDisabled">
    JavaScript is disabled
    </div>The first div contains the text "JavaScript is enabled" while the second one says "JavaScript is disabled". The first div is also made hidden. Now, we attach the checkJavaScriptValidity function to the onload event of the page.
    <body onload="checkJavaScriptValidity()">checkJavaScriptValidity hides the second div and make the first one active. If JavaScript is enabled you will see the first div which says "JavaScript is enabled". If JavaScript is disabled you will see the second div which says "JavaScript is disabled".
    <script language="javascript" type="text/javascript">
    function checkJavaScriptValidity()
    document.getElementById("jsEnabled").style.visibility = 'visible';
    document.getElementById("jsDisabled").style.visibility = 'hidden';
    </script>But I guess since you want it to do it in Java, you'll need this information at the Server side as Browsers dont execute Java code. In that case you could just do an HTTP hit from a javascript function on load with information about the current session. But I still do not understand why would need this information at the server side as your purpose seems to be to ask the user to enable Javascript on his browser.

  • Java script not enabled

    I want to email a web page to my friends but the illustrations in the web page do not show up in the email. Instead the is a note that says "Java Script not enabled." If I go to Safari Preferences and go to the security tab, Java Script is checked to be enabled. How can I get these illustrations into my email? What is the problem?
    Thank you,
    Carl

    Try re-installing Java.
    Java - Install

  • How to detect whether browser's java script  disabled or not from server

    How to detect whether browser's java script disabled or not from server side

    I would use a hidden parameter created by a javascript. if this is null, javascript is disabled...

  • Firefox will not run a WebEx Meeting even though Java Script is Enabled! I am on 4.0, is this a beta version of FireFox? Are you going to Support Java anytime soon?

    I am getting the following error after going in and setting up a WebEx meeting. I will not be able to use FireFox unless you get the ability to enable Java:
    "Java Not Enabled
    Meeting Center cannot be installed because Java is disabled in your Web browser. Please enable Java in your browser, and then click Set Up again. For instructions on enabling Java, refer to your browser's online help.
    If Java cannot be enabled for any reason, you can download the manual installer and install it from your desktop by double-clicking the installer icon."
    I enabled Java, added WebEx to all secure sites and performed every possible check known to man. This is on your end FireFox.
    Do you have an ETA when 4.0 will support Java?

    I will not pretend to know any answers to your problems, but I do wonder if you realise Firefox did decide to produce and support an Extended Stability Release, unfortunately this is NOT going to be based on Firefox 3.6. but on Firefox 10.
    For those directly concerned with this see https://wiki.mozilla.org/Enterprise#How_to_Participate_and_Post

  • YouTube and Yahoo problems - Enable Java Script or Download Latest Flash???

    For a number of weeks, I have had problems with browsing certain sites. I initially noticed that some adverts had a connection error on web pages that were displaying their content fine in every other way.
    I then noticed that I couldn't access any page to do with Yahoo (connection error). I assumed that Yahoo was down until I tried to access YouTube where all that is displayed is a white page with all the text from the page in columns down the left hand side.
    There is an error message that tells me to check that Java Script is Enabled or to download the latest Flash Player.
    I have checked Java Script (enabled) and uninstalled / reinstalled latest Adobe Flash, but still have the same issue. I have the same problem with Firefox 2 and 3, and even installed Opera and got the same problem.
    All the forums and support pages I can find don't seem to come up with a definitve answer.
    This is the first REAL issue I have had with my Mac since I have had it and it has never let me down untill now......HELP!!
    Thanks (I hope!!) in advance.

    Could it be a routing problem even though I never used to have this problem with the current router and provider?
    There are also three other laptops using the same router and provider (all PCs), they all have no problems connecting to YouTube, Yahoo, etc.
    Is it possible that a routing problem would only affect my Mac?
    I have tried Safari, Firefox (2 & 3) and Opera. All have same issue.
    I think I have cleared cache, can someone confirm the correct procedure?
    Message was edited by: Lekseon

  • Sreaming at the top of my lungs for HELP with Java Script problem!

    Hello,
    I have this strange problem that no one seems to know why or how to fix it.Whenever I encounter a web site that has java scripting for anything pop ups or redirects to url's anything that says java script when I mouse over the link my browsers do nothing.That is for explorer 6.0 beta netscape 4.7 and netscape version 6.I have tried in another forum some suggestions but nothing changed even though I am told nothing is wrong with the java scripting.I used to be able to click java script's with all of these browsers but no longer.That was a few months ago.Now to try something new I tried to see if a new browser would work.I now have the latest version of Opera.It did work but using Opera on some sites limits what I can do so it doesn't solve my problem.Then I tried the Sun JavaHot browser it also worked but limits what I can do on some site's.I have Windows 98 & updated most of my dll's etc & my java is version 2 1.3.1.My java script is enabled in Explorer & netscape's & the security is at a minimum level.Please help me figure out why these other browsers work but the other's do not.I want to edit a web site of mine but I can't because of this problem.I am very frustrated by this and need as detailed help as I can get.Anything of a suggestion would be very much appreciated.But I am also not an expert on the working's of a computer so bear with me.
    Brian

    Hi,
    Well I am thinking that if anyone could know something about Java script it would be java developers.But anyways I had the previous version of explorer 5.0 & the java didn't work in it either.Now how weird is this,I opened netscape 4.7 today & the java scripts are suddenly working.This has me scratching my head wondering if my computer is possesed by some force beyond my capability to know...????Weird as it seems though the explorer still will not respond to a java script.
    Brian

  • Problems with Java Scripting API

    Hello Everyone!
    Guys, I need help with Java scripting API. A problem is that I cannot understand how can I operate Java Object's fields and methods from the script language. I have chosen embedded javascript to work with. And I can get the fields and methods of in-box java classes (such as ArrayList for example), but I cannot work with methods and fields from my own classes!
    Here is an example:
    public class ScriptingExample {  
        class MyClass {  
            int myfield = 5;  
            int getInt() {return 7;}  
        public void runExample() {  
            ScriptEngineManager mgr = new ScriptEngineManager();  
            List<ScriptEngineFactory> factories = mgr.getEngineFactories();  
            ScriptEngineManager factory = new ScriptEngineManager();  
            ScriptEngine engine = factory.getEngineByName("JavaScript");  
            MyClass mc = new MyClass();  
            try{  
                engine.put("mc", mc);  
                engine.eval("print(mc.myfield); print(mc.getInt())"); // or engine.eval("print(mc.myfield)");
            } catch (Exception e) {e.printStackTrace();}  
    }  If I run the code with the commented part it prints "undefined" instead of "5".
    If I run the code as it is it prints error instead of "7":
    undefinedjavax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot find function getInt. (<Unknown source>#1) in <Unknown source> at line number 1
    at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
    at com.sun.script.javascript.RhinoScriptEngine.eval(Unknown Source)
    at javax.script.AbstractScriptEngine.eval(Unknown Source)
    at solutiondatabase.ScriptingExample.runExample(ScriptingExample.java:26)
    at solutiondatabase.Main.main(Main.java:49)
    How can I fix it?

    Guys,
    please let me raise this topic because several new questions emerged.
    (1) How can I get all the variables created inside my engine?
    There are two kinds of variables: first kind is Java obejcts put inside the engine and second kind is the variables created in my script, such as 'var a = 4;'. How can I list all the variables of that two kinds?
    (2) Is there is a way to make 'import static' to the engine? I dont want to write MyClass.MyEnum.MyEnumItem every time. Also, I cannot put the whole enum into the engine with engine.put("MyEnum", MyEnum); I can put only enum items separately: engine.put("MyEnum", MyEnum.EnumItemA);. Thats why I ask about static import.
    (3) How can I cast engine variables back to java variables inside my java code?
    Here is my example:
    package mypackage;
    import java.util.ArrayList;
    import java.util.List;
    import javax.script.ScriptEngine;
    import javax.script.ScriptEngineFactory;
    import javax.script.ScriptEngineManager;
    public class Main
         public static void main(String[] args) throws Exception 
              ScriptEngineManager mgr = new ScriptEngineManager();
              List<ScriptEngineFactory> factories = mgr.getEngineFactories();
              ScriptEngineManager factory = new ScriptEngineManager();
              ScriptEngine engine = factory.getEngineByName("JavaScript");
              ArrayList<Double> myList = new ArrayList<Double>();
              myList.add(5.0);                    
              engine.put("MyList", myList);     
              engine.eval("MyVar = MyList.get(0);");
              System.out.println((Double)engine.get("MyVar"));
    }The result is:
    Exception in thread "main" java.lang.ClassCastException: sun.org.mozilla.javascript.internal.NativeJavaObject cannot be cast to java.lang.Double
    +     at mypackage.Main.main(Main.java:28)+
    Is it possible to retrieve my Double java object from the engine?
    Edited by: Dmitry_MSK on Aug 6, 2010 1:56 AM

  • HOW TO ENABLE JAVA SCRIPT IN MY BROWSER

    when i use edudel site it shows JAVA SCRIPT DISABLED PLEASE ENABLE IT.

    You can enable JavaScript in Tools>Options>Content. It's enabled by default.
    If you still get the message after enabling JavaScript, please try to follow the steps at [[troubleshooting extensions and themes]].
    Please let us know of further progress on the issue.

  • Problem on java script

    i'm having problem to access into one of the web, it due to java script problem. now my macbook pro is running with version 10.6.8 and java script is enable.

    What site? Maybe the site has javascript errors.

  • Need to enable java script to login to email

    Cannot login to email error message java script needs to be enabled; in prefernces java script is enabled but still can't login to email

    Your question is confusing. JavaScript is a web technology built into browsers; it does not need to be downloaded. Java ( not script) is a different technology which is downloaded from the Oracle website. Neither of them has anything to do with Adobe.
    Can you post exactly what you're downloading, where it's from, what install steps you take, and what messages, if any, you see?
    Thanks
    Matt

Maybe you are looking for