Re: Using Javascript
| From: | Chris Earle | Date: | Mon, 22 Jul 2002 05:18:28 +0000 |
| Subject: | Re: Using Javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-108818@lists.php.net to get a copy of this message | ||
You use the "onClick" feature like this:
<input type="text" name="text1" onClick="dd.value='<? echo
$correct; ?>'">
no semicolon unless there is more than one thing being called/defined -- you
use single quotes within the onClick's double quotes
"Uma Shankari T." <umashankari@lantana.tenet.res.in> wrote in message
news:Pine.LNX.4.21.0207221036440.5663-100000@lantana.iitm.ernet.in...
>
> Hello,
>
> I need to display a value on the text box during onClick event where the
> data is fetched from the database..I have given the code like this but it
> is giving unterminated string constant..
>
>
> <input type=text name=text1 onClick=(dd.value="<? echo $correct; ?>");
>
>
> Can anyone please tell me how to solve this ...
>
>
> Thanks & Regards,
> Uma
>