Can not JavaScript objects in Java project

Hi guys and girls,
I have CMP managed java project that I am trying to create a menu for. Each time I create a new javascript object I am getting the error "objectname is undefined". Below is a code snipset followed by the error message I get when I try displaying the jsp.
<head>
     <link rel="stylesheet" href="menu.css">     
     <script language="javascript" type="text/javascript" src='menu.js'></script>     
     <script language="javascript" type="text/javascript" src='menu_items.js'></script>     
     <script language="javascript" type="text/javascript" src='menu_tpl.js'></script>
</head>
<body leftmargin="15" rightmargin="15" marginheight="15" marginwidth="15" bgcolor="white">
<script language="javascript">               
          new menu (MENU_ITEMS, MENU_POS);
     </script>     
</body>
The error message is 'menu' is undefined.
I supspect that the src=menu.js reference is not working but I am not sure how I can change this. Any help would be appreciated.

Hi guys and girls,
I have CMP managed java project that I am trying to
create a menu for. Each time I create a new javascript
object I am getting the error "objectname is
undefined". Below is a code snipset followed by the
error message I get when I try displaying the jsp.
<head>
<link rel="stylesheet" href="menu.css">
<script language="javascript" type="text/javascript"
src='menu.js'></script>
<script language="javascript" type="text/javascript"
src='menu_items.js'></script>
<script language="javascript" type="text/javascript"
src='menu_tpl.js'></script>
</head>
<body leftmargin="15" rightmargin="15"
marginheight="15" marginwidth="15" bgcolor="white">
<script language="javascript">
new menu (MENU_ITEMS, MENU_POS);
</script>
</body>
The error message is 'menu' is undefined.
I supspect that the src=menu.js reference is not
working but I am not sure how I can change this. Any
help would be appreciated.
Hi
I didn't get a clear picture of your question. Any way try this.
1) make sure that menu.js is in the same directory as your jsp file. if it is not give the proper path.
2) what is this MENU_ITEMS, and MENU_POS. instead of it try with integers

Similar Messages

  • How to manipulate a javascript object in java?

    Hi, I am fiddling with the java scripting interface. As I understand the rhino engine is packaged with the jdk but what I don't understand is how does one reconcile the objects one gets from their engine (e.g. sun.org.mozilla.javascript.internal.ScriptableObject) versus the ones in the rhino api (e.g. org.mozilla.javascript.ScriptableObject)?
    Is the one in the jdk heavily modified or wrappered up to suit their javax.scripting interface?
    More specifically, how do I manipulate javascript objects from java?
    e.g. suppose I have this java code:
    ScriptEngineManager mgr = new ScriptEngineManager();
    ScriptEngine js = mgr.getEngineByName("js");
    jsEngine.eval("var foo = { x : 1, y : 'hello', z : false };");
    Object o = jsEngine.get("foo");Now o is instanceof sun.org.mozilla.javascript.internal.NativeObject, which is a subclass of a bunch of other classes in the s.o.m.j.i namespace. Being internal I can't use these directly.
    Looking at the Rhino API obviously you normally get a org.mozilla.javascript.ScriptableObject and can call the .get() .getIds() methods. But I don't know how to translate the objects I am getting in my actual java code which uses the jdk engine into org.mozilla.javascript objects.
    Is this even possible? Am I misunderstanding something completely? Should I just be using the rhino js jar and not the javax.scripting interface? If so, for what reason is the javax.scripting interface implemented?

    Assuming that you DO want a deep copy, begin with a constructor that takes another hand.
    public Hand( Hand h ) { ...Then for each instance variable, within that constructor:
    this.instVar0 = h.instVar0;
    this.instVar1 = h.instVar1;
    . . .And last, for every reference, make sure there is a constructor (or copy method for arrays) that itself makes a deep copy:
    this.ref0 = new Ref0Type( h.ref0 );

  • After "Replace with clip" the original clip can not be deleted from the project - why?

    After using "replace with clip" to replace clip A in the timeline with a new clip B , clip A can not be deleted from the project anymore.
    If you try to delete clip A, you get a warning, that it still has references in one or more sequences.
    If you continue and delete clip A, it seems to be deleted - at first!
    Unfortunately if you save and reopen the project, clip A is restored to folder "Recovered clips".
    It's not possible to really delete it.
    I also did not find a way to unlink clip B from A .
    The only thing you can do, is to revert the change by "Restore Unrendered" in the clip context menu. But that's obviously not helping
    I dont know if this is a bug or a feature. I understand, that it can be useful to undo the "replace clip" function, but why would anyone not want to be able to delete the original clip at all?
    help how to fix this problem is greatly appreciated!
    I use Premiere Pro CC 2014.2 (Win7 64bit)

    I'm sure it has nothing to to with other sequences.
    You can easily reproduce this behaviour:
    1. create a new project
    2. import 2 clips and name them "A" and "B"
    3. put "A" in the timeline
    4. ALT-drag "B" over "A" in the timeline (or right-click "A" in the timeline while selecting "B" in the project files and select "replace with clip ... from bin")
    5. delete "A" from the project files
    6. save and close project
    7. reopen project
    => "A" reappears in "Recovered clips" and can not be deleted.

  • All browser run can access javascript objects in iframe but in firfox you can not do that after first refresh

    1- I have a DIV tag in html page
    2- Load dynamically an IFrame into that DIV
    3- suppose that I have a JS function in that IFrame with name "func".
    4- after first loading IFrame in DIV I can access "func"
    5- but after reloading another IFrame into DIV I can access "func" in all browser IE,Chrome,Opera but I can not do this in FireFox

    Hello,
    Thank you for using the Troubleshooter extension. It seems you use Kasperskey - first see if this post helps you fix the problem:
    * https://support.mozilla.org/en-US/questions/1026631#answer-650916
    You can also check the article [["This Connection is Untrusted" error message appears - What to do]] as it provides common troubleshooting steps.
    Let us know if that solves your problem!

  • OID can not display some users - java.lang.ArrayIndexOutOfBoundsException:0

    We have set up AD to OID synchronization for users and groups using Import connector, and it worked fine. The users in OID can log into applications protected by OAM. But recently I found that some users that could be displayed in OID before can not be displayed now. If I click on the DN in Oracle Directory Manager, a error window pops up. It is a long error message, and the first a few lines are as follows :
    0
    java.lang.ArrayIndexOutOfBoundsException:0
    at oracle.ldap.admin.AttrOptions.<init>(entry.jave:3151)
    at Oracle.ldap.admin.Entry.getProp(entry.java:457)
    I don't see any error message in the integration profile or log files. I am testing things on an account that is having this trouble, and the strange thing is that it can not log into application protected by OAM any more, but it can log into OAM console.
    We use OID 10.1.2.3 on Windows, and OAM 10.1.4.0.1.
    I searched in Metalink but didn't find anything helpful. Any help is appreciated. Thanks for your time.
    Hailie

    Pramod,
    Thank you for your reply. Please see below my answers to your questions:
    -> Do you see any pattern in the users (DN) that are unable to be displayed/login?
    Yes I do see some pattern. There is one change on the problem user's dn - the "\" after the last name is gone.
    Before: cn=smith\, john, cn=users,dc=abc,dc=com
    Now: cn=smith, john, cn=users,dc=abc,dc=com
    However I check in Active directory "\" is presented. In OID if I right click on cn=smith, john and try to delete it, I got a error message "LDAP: error code 34 - Error in DN Normalization". Is that caused by the missing of "\"?
    -> Does ldapsearch on these users (with all attributes) show something (special chars, etc)?
    ldapsearch on cn=cn=smith, john,cn=users,dc=abc,dc=com returns no objects:
    $ldapsearch -L -D "cn=orcladmin" -w "*****" -h host -p 389 -b "cn=smith, john,cn=users,dc=abc,dc=com" -s sub "objectclass=*"
    ldap_search: No such object
    ldap_search: matched: cn=Users, dc=abc,dc=com
    Ldap search on cn=smith\, john,cn=users,dc=abc,dc=com:
    $ldapsearch -L -D "cn=orcladmin" -w "*****" -h host -p 389 -b "cn=smith\, john,cn=users,dc=abc,dc=com" -s sub "objectclass=*"
    dn: cn="smith, john",cn=users,dc=abc,dc=com
    uid: [email protected]
    employeenumber: 916963
    cn: smith, john
    registeredaddress: 512
    krbprincipalname: [email protected]
    orclsamaccountname: ABC.COM$JSmith
    sn: johnsmith
    displayname: John
    orclobjectguid: lJO0N+8H4UW/30yHukSfsw==
    orclobjectsid: AQUAAAAAAAUVAAAAohxTYWIV3XFeP55cYjwAAA==
    orcluserprincipalname: [email protected]
    objectclass: oblixorgperson
    objectclass: inetorgperson
    objectclass: orcluserv2
    objectclass: person
    objectclass: orcladuser
    objectclass: organizationalPerson
    objectclass: top
    obver: 10.1.4.0
    -> Do you see the same behavior when you use any generic LDAP browser (Ex: Apache Directory Studio) instead of ODM?
    I don't have Apache Directory Studio installed yet. I will try that later.
    -> Does the changelog for the particular synch (for the affected users) show something?
    Here is what I found in ActiveChgImp.aud
    (weeks ago)
    97426524 : Success : MODIFY : cn=smith\, john,cn=users,dc=abc,dc=com
    (Recently change - The back slach after smith was gone, and "" showed up)
    97469970 : Success : MODIFY : cn="smith, john",cn=users,dc=abc,dc=com
    -> If login to OAM is possible, can the user modify his/her profile, and does it save the changes? If it does, can you try logging in to apps?
    This user can log into OAM identity system, but when I click on "My profile" under "User manager", I got a error message "You do not have sufficient access rights".
    If I log into identity system as orcladmin, I was able to modify it and save the changes. But in OID the user is still not displayed. Same error message. When I tried to add it as administrator, I could search on it, add it, but when I press "done", it didn't show up on the admin list. The users that can be displayed in OID can be added to admin list without a problem.
    Thanks,
    Hailie

  • [Urgent] using javafx object in java project

    Suppose I here created a very simple java project and the main file is like below,
    public class test {
        public static void main(String[] args){
                System.out.println("Hello World!");
    }and in this particular java project, I need to use another javafx object which is defined as (the javafx and java file are in the same package),
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    var stage: Stage = Stage {
        title: "Declaring Is Easy!"
        scene: Scene {
            width: 300
            height: 250
            content: [
                Circle {
                    centerX: 150  centerY: 120 radius: 80
                    fill: Color.MAROON
                    stroke: Color.INDIANRED
                    strokeWidth: 10.0
                }, //Circle
                Rectangle {
                    x: 25, y: 80 width: 250, height: 80
                    arcWidth: 20 arcHeight: 20
                    fill: Color.web("#6699ff")
                    stroke: Color.web("#003399")
              strokeWidth: 5.0
                } //Rectangle
            ] //Content
        } //Scene
    } //StageSo how could I achieve this?
    Regards.

    Thanks for your reply.
    But would you please elaborate on this sentence: create the fx class using Class.forName("....").newInstance()?
    Indeed I implemented an interface which was extended by the javafx class, and in the main java file I need to write following codes to use this object,
    Context context = FXLocal.getContext();
            FXClassType instance = context.findClass("packageName.JavaFXClass");
            ObjectValue obj = (ObjectValue)instance.newInstance();
            JavaInterface ji = (JavaInterface)obj.asObject();The problem that I encountered right now is, the exception was thrown at context.findClass("javatest.MyChart");, since it's not able for the compiler to find the JavaFXClass.class.
    I checked the folder build\classes\packageName and noticed that both my main JavaClass and JavaInterface have been compiled with .class file, while the JavaFXClass was not, which means the file JavaFXClass.class doesn't exist.
    What's the solution?

  • ActiveX Component Can Not Create Object

    Obviously, this error is not rare and not limited to Adobe. What is troubling about this one for me is that it happens so inconsistently. I'm programming in VS2005/VB.net. The application receives incoming faxes in TIF format and converts them to PDFs.
    The files get routed through our company and at two points the PDF files get watermarks added. There is a single procedure that applies both watermarks. The error is never generated on the first call and happens less than 25% of the times on the second call. It happens on some computers more than others. I trap for the error and I'm able to deal with it, but it would be better if I could stop it from happening. All of our users have Acrobat Standard version 8.1.0
    Any help is appreciated.
    Thanks,
    Greg

    Well, it is hard to say exactly where it is happening because it has never happened on my development machine. I have the Apply Watermark() procedure trapped in a Try...Catch block and that is what throws the exception. Below is the procedure. The parameters passed in are a the file name, the text of the watermark, and either a 1 or a 0, depending on whether it is the first or second watermark. Above this procedure, the only thing that happens to the document prior to the Apply Watermark call is that the PDF document is moved from a temporary holding folder on the server to a permanent folder on the same server. The file is moved and then the watermark is applied.
        Public Sub ApplyWaterMark(ByVal sPDFFileIn As String, ByVal sWatermarkStr As String, ByVal iIndex As Integer)
            ' global variables
            Dim jsObj As Object
            ' Create a PDDoc IAC object.
            Dim pdDoc As Acrobat.CAcroPDDoc
            pdDoc = CreateObject("AcroExch.PDDoc")
            If pdDoc Is Nothing Then
                MsgBox("Failed to create Acrobat PDDoc object.")
                Exit Sub
            End If
            Rename(sPDFFileIn, sPDFFileIn & "temp")
            ' Open the source PDF document
            Dim rc As Integer
            rc = pdDoc.Open(sPDFFileIn & "temp")
            If rc <> -1 Then
                MsgBox("Failed to open PDF document " & sPDFFileIn, MsgBoxStyle.Critical)
                Exit Sub
            End If
            ' Acquire the Acrobat JavaScript Object interface from the PDDoc object
            jsObj = pdDoc.GetJSObject
            ' make a color object
            Dim oColor As Object
            oColor = jsObj.color.black()
            ' Add a text watermark.
            ' function prototype:
            jsObj.addWatermarkFromText(sWatermarkStr, 2, "Helvetica", 10, oColor, 0, 0, True, True, True, 0, 2, 1, 200 + iIndex * 30, False, 1.0, False, 0, 1)
            ' save the PDF with watermarks to a new document.
            rc = pdDoc.Save(1, sPDFFileIn)  ' full save
            ' close original PDF.
            pdDoc.Close()
            pdDoc = Nothing
            jsObj = Nothing
            ' to clean up, get the Acrobat application, 
            ' close Acrobat if there are no open documents.
            Dim gApp As Acrobat.CAcroApp
            gApp = CreateObject("AcroExch.App")
            If gApp.GetNumAVDocs = 0 Then
                gApp.CloseAllDocs()
                gApp.Exit()
            End If
            ' show message. You can comment it out if you really need a quiet operation.
            If rc <> True Then
                MsgBox("The watermark failed to apply. This document was not time stamped.", MsgBoxStyle.Critical)
            Else
                Kill(sPDFFileIn & "temp")
            End If
        End Sub

  • Why I can not find field:Level in Project Hierarchy in BAPI_BUS2054_NEW?

    Dear experts,
        Why I can not find the field of "Level in Project Hierarchy" in structure BAPI_BUS2054_NEW?
    I only define the data to upload wbs:
    PROJECT DEFINITION
    PROJECT DESCRIPTION
    PROJECT PROFILE
    WBS Element
    WBS description
    Can you tell me which fields must to upload?
    Looking forward to your reply.
    Many thanks.
    Merryzhang

    Anyone can help me ?I need the field "Level" in BAPI_BUS2054_NEW,But I can not find it.

  • My mouse freezes in adobe muse can not move objects

    the problem is that my mouse after a few minutes it freezes and will not let me move objects.
    this happens with adobe muse 2014.2
    and the worst is that my file can not be opened with earlier versions ( help)

    I think this is a bug in the new update. I have made numerous sites since and all of them have gotten the horiztonal scroll. I mentioned it in the bug section and had a staff member help me with my first issue but have not heard anything else since.
    This is a pretty serious bug, you can not launch a website with a horizontal scroll like this.
    on another note, I really like the look of your site, very slick so far!

  • Can not Scale Objects

    Hi folks. I have an odd issue I can't find a solution for (obviously), even searching the forums and google. I can select all objects in my drawing, I can see that the bounding has selected all objects - but I can not scale them.
    I'm using Adobe CS3, Mac G5 platform

    Don't forget the Scale tool (S). You can use it whether you use bounding boxes or not.
    Double-click on the tool or option-click on the scaling origin to get the dialogue window.

  • Update to Mavericks and Imovie update and I can not find any os my projects :( Anybody know how to fix it?

    After the update, imovie create 3 different libraries, and I can not find my original Projects. Anybody know how to fix it?

    Let's start out with exactly what software version are you using.

  • I can not run or compile java programme

    I am first time java programmer I can not run or compile any java programme.
    (can not read
    1 error) this is the the message that I am getting from my dos

    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    Try the tutorial.
    It sounds like your error message comes from compiling. For example, "javac mysourcecode.java" If that is correct, the most common trouble comes from using a program like Notepad on Windows to create the soruce code. The tutorial will walk your through it.

  • Profibus card program has 429 ActiveX component can not create object

    I have a Profibus card (DF_PROFI_II DP). It was working fine on an old PC. Our IT department need to upgrade PC to a new one, and now I can not get it to work on the new PC. 
    Both PCs run windows XP. I tried driver for original CD which is 1.32.1 and I tried a downloaded driver 1.35.0. In both cases, windows can recognize the hardware. However when I tried to run Configurator II, the program always shows a message like below:
    Anybody can help?
    Thanks,
    Attachments:
    error.JPG ‏14 KB

    If the error happens as soon as you start the configurator I would think there is a conflict between different versions of the configurator.
    Could you go ahead and remove the board from your PC, uninstall all Comsoft components from your machine. Sometimes that might be not only the driver but also the configurator.
    Then go ahead and delete the Comsoft folder, reboot and install the 1.36.2 driver.
    Then install the detect the board again and try the configurator.
    DirkW

  • Can not create WebService with java.util.Locale object why?

    I am unable to create a WebService which contains a Locale Object in the request.  I assume its because the java.util.Locale object is not Serializable.  Can anyone tell me if there is a work around for this?

    Hi,
    Make sure your strings for Locale follow these rules...
    The language string should be lower-case, two-letter codes as defined by ISO-639.
    http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
    The country string should be upper-case, two-letter codes as defined by ISO-3166.
    http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
    Or try with some constant Locales like
    Locale.CANADA
    Locale.US
    regards,
    Uma

  • TF400463 :Can not able to create team project in tfs 2013

    HI
    When am trying to create new project in TFS Collection I cant able to create a project. Since am getting the below error "TF400463 Project Creation failed with error: Object reference not set to an instance of an object"

    Hi
    since the problem not yet solved ... can you share some more details so that I can try it .. find the below error message which am getting ...
    Error Code : TF400463
    <v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe"
    stroked="f"><v:stroke joinstyle="miter"><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f
    eqn="prod @3 21600 pixelWidth"><v:f eqn="prod @3 21600 pixelHeight">
      <v:f eqn="sum @0 0 1">
      <v:f eqn="prod @6 1 2">
      <v:f eqn="prod @7 21600 pixelWidth">
      <v:f eqn="sum @8 21600 0">
      <v:f eqn="prod @7 21600 pixelHeight">
      <v:f eqn="sum @10 21600 0">
     </v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
     <v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
     <o:lock aspectratio="t" v:ext="edit">
    </o:lock></v:path></v:stroke></v:shapetype><v:shape alt="cid:[email protected]" id="_x0000_i1025" style="width:723pt;height:275.25pt;" type="#_x0000_t75">
    <v:imagedata o:href="cid:[email protected]" src="file:///C:\Users\arockia_kumar.ITLINFOSYS\AppData\Local\Temp\msohtmlclip1\01\clip_image001.jpg">
    </v:imagedata></v:shape>

Maybe you are looking for

  • Photos not appearing in adobe reader

    I've created a pdf from a Pages document using the print dialog and and the photos contained in the pdf won't appear using Adobe Reader (I'm running Snow Leopard), but they do display using Quick Look and Preview.  My neighbor has a Mac (running Lion

  • Built-in dictionary not showing

    Hey all , how are you ? The built-in dictionary not working !! It was working before but i don't know what happend ! I formated my iphone and then restored it from itune and when i went to notes and highlighted a word and clicked on define , it told

  • Multi-language report in XML publisher (This is urgent!!)

    Hi All, i am working on Multi-Language report. We have installed just 3 languages (English, Japaneese, Spanish) but my requirement is to display the reports in few more un-installed languages like Korea, chineese etc. I thought of doing the lables (a

  • Unable to Persistent ConnPool  & DS in config.xml created  dynamically.

    Here is my scenario. I am trying to create JDBCConnectionPools and JDBCDataSources dynamically from a StartupClass. The StartupClass is creating the ConnectionPool and DataSources but it is not persisting it to the config.xml. I tried using setPersis

  • Formula Waveform VI

    I am trying to use the formula waveform VI to generate this equation " y(t) = 7exp(-10t)sin(20*pi*t ) + 2; I put the parameters as follow: frequency = 10 amplitude = 7 formula = exp(-10*t)*sin(w*t) +2 The formula waveform VI  did not work correctly b