[eluser]halwaraj[/eluser]
[quote author="oll" date="1238878344"]Your clicked() function won't be called by magic just because its name is "clicked"

. You have to put an event somewhere.
Typically
Code:
<button name="aButton" type="submit" onclick#"clicked()" >
Replace # by = in the aboveline : the forum doesn't seem to like it : it refuses me to write it.[/quote]
Oh,
I had it in the code, just that forgot to put that here.
Here is the missing part:
Code:
echo form_button( $button, '', $js );
$js = 'onclick="return clicked()"';
the code
Code:
<button name="aButton" type="submit" id="aButton" value="false">Edit</button>
is what is getting generated.
I put an alert in the js function. It is working properly.
What else do I need to look at?