need some help!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rcoco

    need some help!

    Hi everyone,
    I'm having trouble with a datagrid that is supposed to insert data.
    But one row has to insert data in the data base using Radio button. So
    I created two buttons one of Bad Mood then the other one is Good mood.
    when one is selected, the data is to be inserted into the database.
    this is working well. But the problem comes when it comes to images,
    thes images are smilies. When good mood is selected I want a smiley to
    be inserted into the database too. So I created the smilies but when
    and made them invisible so I wrote this code to be able save them in
    the database but I'm getting two errors. Where could I be wrong?

    document.getEle mentById("imggm ").style.visibi lity = "hidden";
    function ChangeSmile()
    {
    if (document.getEl ementById("rblm ood_0"))
    {
    document.getEle mentById("imggm ").style.visibi lity = "none";
    document.getEle mentById("imggm ").src = "laughing.g if";
    }
    else
    {
    document.getEle mentById("imgbm ").style.visibi lity = "visible";
    document.getEle mentById("imgbm ").src = "sad.gif";
    }
    }

    The errors are:

    Invalid token '(' in class, struct, or interface member declaration
    Invalid token '=' in class, struct, or interface member declaration
    (This error appears on the line:
    document.getEle mentById("imggm ").style.visibi lity = "hidden";)

    Thanks.

  • Patrick Steele

    #2
    Re: need some help!

    In article <1173453985.628 010.245360@s48g 2000cws.googleg roups.com>,
    nclauder@yahoo. ca says...
    Hi everyone,
    I'm having trouble with a datagrid that is supposed to insert data.
    But one row has to insert data in the data base using Radio button. So
    I created two buttons one of Bad Mood then the other one is Good mood.
    when one is selected, the data is to be inserted into the database.
    this is working well. But the problem comes when it comes to images,
    thes images are smilies. When good mood is selected I want a smiley to
    be inserted into the database too. So I created the smilies but when
    and made them invisible so I wrote this code to be able save them in
    the database but I'm getting two errors. Where could I be wrong?
    >
    document.getEle mentById("imggm ").style.visibi lity = "hidden";
    function ChangeSmile()
    {
    if (document.getEl ementById("rblm ood_0"))
    {
    document.getEle mentById("imggm ").style.visibi lity = "none";
    document.getEle mentById("imggm ").src = "laughing.g if";
    }
    else
    {
    document.getEle mentById("imgbm ").style.visibi lity = "visible";
    document.getEle mentById("imgbm ").src = "sad.gif";
    }
    }
    >
    The errors are:
    >
    Invalid token '(' in class, struct, or interface member declaration
    Invalid token '=' in class, struct, or interface member declaration
    (This error appears on the line:
    document.getEle mentById("imggm ").style.visibi lity = "hidden";)
    Is "getElementById " a method or an indexer? I wonder if it should be:

    document.getEle mentById["imgbm"].style ....

    --
    Patrick Steele

    Comment

    • rcoco

      #3
      Re: need some help!

      Thanks Patrick,
      What could it be? I have to get a smiley being inserted into sql
      database. Do you have an Idea how?
      Thanks

      Comment

      Working...