R
rcoco
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.getElementById("imggm").style.visibility = "hidden";
function ChangeSmile()
{
if (document.getElementById("rblmood_0"))
{
document.getElementById("imggm").style.visibility = "none";
document.getElementById("imggm").src = "laughing.gif";
}
else
{
document.getElementById("imgbm").style.visibility = "visible";
document.getElementById("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.getElementById("imggm").style.visibility = "hidden"
Thanks.
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.getElementById("imggm").style.visibility = "hidden";
function ChangeSmile()
{
if (document.getElementById("rblmood_0"))
{
document.getElementById("imggm").style.visibility = "none";
document.getElementById("imggm").src = "laughing.gif";
}
else
{
document.getElementById("imgbm").style.visibility = "visible";
document.getElementById("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.getElementById("imggm").style.visibility = "hidden"
Thanks.