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." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > 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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php