missing : after property id error

Discussion in 'Javascript' started by 1 connu, Jun 3, 2008.

  1. 1 connu

    1 connu Guest

    Hi,

    I don't have any clue with Javascript but I use one from Sun for Java applet
    deployement (http://java.com/js/deployJava.js).

    The parameters of my applet are generated according to user's choices. I
    have a case with error "missing : after property id" on line 816.

    Thanks in advance for any help.


    Pierre

    The script :
    <script>
    788 var attributes =
    789 {
    790 code: 'concentrationapplet.ConcentrationApplet.class',
    791 width: 680,
    792 height: 450,
    793 archive:
    'JFreeChart/jfreechart-0.9.21.jar,JFreeChart/jcommon-0.9.6.jar,Concentration.jar',
    794 codebase: 'http://localhost:8080'
    795 };
    796
    797 var parameters =
    798 {
    799
    800 subsNo: 3,
    801
    802 substance: 'ACENOCOUMAROL',
    803
    804 T12: 10.00000,
    805
    806 Q0: 1.00000,
    807
    808 substance2: 'AMPRENAVIR',
    809
    810 substance3: 'ALPRAZOLAM',
    811
    812 T123: 13.00000,
    813
    814 Q03: 0.70000,
    815
    816 Ki_2_1_3A4/5: 0.05561, // error here !!!
    817
    818 listKi: 'Ki_2_1_3A4/5;'
    819
    820 };
    821
    822 var version = '1.5.0';
    823
    824 deployJava.runApplet (attributes, parameters, version);
    825 </script>
     
    1 connu, Jun 3, 2008
    #1
    1. Advertising

  2. 1 connu

    Jorge Guest

    On Jun 3, 11:23 am, "1 connu" <> wrote:
    > Hi,
    >
    > The parameters of my applet are generated according to user's choices. I
    > have a case with error "missing : after property id" on line 816.
    >
    > 816 Ki_2_1_3A4/5: 0.05561, // error here !!!


    "Ki_2_1_3A4/5" is not a valid name : the problem is the slash "/".

    --Jorge.
     
    Jorge, Jun 3, 2008
    #2
    1. Advertising

  3. 1 connu

    1 connu Guest

    I put quotes and the problem disappears.

    'Ki_1_2_3A4/5': 0.05561,


    "1 connu" <> a écrit dans le message de news:
    45ce5$48450dab$55da1131$...
    > Hi,
    >
    > I don't have any clue with Javascript but I use one from Sun for Java
    > applet deployement (http://java.com/js/deployJava.js).
    >
    > The parameters of my applet are generated according to user's choices. I
    > have a case with error "missing : after property id" on line 816.
    >
    > Thanks in advance for any help.
    >
    >
    > Pierre
    >
    > The script :
    > <script>
    > 788 var attributes =
    > 789 {
    > 790 code: 'concentrationapplet.ConcentrationApplet.class',
    > 791 width: 680,
    > 792 height: 450,
    > 793 archive:
    > 'JFreeChart/jfreechart-0.9.21.jar,JFreeChart/jcommon-0.9.6.jar,Concentration.jar',
    > 794 codebase: 'http://localhost:8080'
    > 795 };
    > 796
    > 797 var parameters =
    > 798 {
    > 799
    > 800 subsNo: 3,
    > 801
    > 802 substance: 'ACENOCOUMAROL',
    > 803
    > 804 T12: 10.00000,
    > 805
    > 806 Q0: 1.00000,
    > 807
    > 808 substance2: 'AMPRENAVIR',
    > 809
    > 810 substance3: 'ALPRAZOLAM',
    > 811
    > 812 T123: 13.00000,
    > 813
    > 814 Q03: 0.70000,
    > 815
    > 816 Ki_2_1_3A4/5: 0.05561, // error here !!!
    > 817
    > 818 listKi: 'Ki_2_1_3A4/5;'
    > 819
    > 820 };
    > 821
    > 822 var version = '1.5.0';
    > 823
    > 824 deployJava.runApplet (attributes, parameters, version);
    > 825 </script>
    >
    >
    >
    >
     
    1 connu, Jun 3, 2008
    #3
  4. 1 connu

    1 connu Guest

    Thanks Jorge, you are right, I fix it with quotes.

    Pierre

    "Jorge" <> a écrit dans le message de news:
    ...
    On Jun 3, 11:23 am, "1 connu" <> wrote:
    > Hi,
    >
    > The parameters of my applet are generated according to user's choices. I
    > have a case with error "missing : after property id" on line 816.
    >
    > 816 Ki_2_1_3A4/5: 0.05561, // error here !!!


    "Ki_2_1_3A4/5" is not a valid name : the problem is the slash "/".

    --Jorge.
     
    1 connu, Jun 3, 2008
    #4
  5. 1 connu

    Jorge Guest

    On Jun 3, 11:37 am, "1 connu" <> wrote:
    > Thanks Jorge, you are right, I fix it with quotes.
    >


    Hmm, thank you Pierre, I never thought that a property's name could be
    "~anyText" :

    <html><head>
    <script>
    window.onload= function () {
    var o= {
    './=88Ki_2_1_3A4/5': 0,
    '/=88Ki_2_1_3A4/5': 1,
    '=88Ki_2_1_3A4/5': 2,
    '88Ki_2_1_3A4/5': 3,
    '{Ki_2_1_3A4/5': 4,
    '[i_2_1_3A4/5': 5,
    '\\2_1_3A4/5': 6
    };
    for (property in o) { alert(property+": "+o[property]) }
    };
    </script></head><body></body></html>

    --Jorge.
     
    Jorge, Jun 3, 2008
    #5
  6. Jorge wrote:
    > On Jun 3, 11:37 am, "1 connu" <> wrote:
    >> Thanks Jorge, you are right, I fix it with quotes.

    >
    > Hmm, thank you Pierre, I never thought that a property's name could be
    > "~anyText" :


    But subsections 11.1.5 and 11.2.1 of the ECMAScript Specification, Edition 3
    Final (and other sections of previous editions), say so :) (Note that this
    also includes the empty string.)

    This feature of ECMAScript implementations makes Object objects extremely
    useful for the implementation of what is known as a dictionary e.g. in
    Python, and augmented Array objects for the implementation of what is known
    as an associative array e.g. in PHP. As for the former, I remember to have
    posted an example for a customer address book recently:

    <news:>

    BTW, while searching for it, I found this article that you were interested
    in: <news:>. There's at least one other:
    <news:>


    HTH

    PointedEars
    --
    realism: HTML 4.01 Strict
    evangelism: XHTML 1.0 Strict
    madness: XHTML 1.1 as application/xhtml+xml
    -- Bjoern Hoehrmann
     
    Thomas 'PointedEars' Lahn, Jun 3, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gary Herron
    Replies:
    2
    Views:
    674
    Bruno Desthuilliers
    Jul 4, 2006
  2. Michael
    Replies:
    0
    Views:
    492
    Michael
    Feb 3, 2007
  3. dave

    Control missing property after postback with repeater

    dave, Aug 1, 2006, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    148
  4. Replies:
    1
    Views:
    258
  5. Vv_vV

    missing ) after argument list error

    Vv_vV, Mar 30, 2007, in forum: Javascript
    Replies:
    4
    Views:
    151
    Michael
    Mar 31, 2007
Loading...

Share This Page