Welcome Guest, Not a member yet? Register   Sign In
Accessing hidden form fields
#3

[eluser]halwaraj[/eluser]
[quote author="oll" date="1238878344"]Your clicked() function won't be called by magic just because its name is "clicked" Wink. 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?


Messages In This Thread
Accessing hidden form fields - by El Forum - 04-04-2009, 04:56 AM
Accessing hidden form fields - by El Forum - 04-04-2009, 09:52 AM
Accessing hidden form fields - by El Forum - 04-05-2009, 01:49 AM
Accessing hidden form fields - by El Forum - 04-05-2009, 01:56 AM
Accessing hidden form fields - by El Forum - 04-05-2009, 09:31 AM
Accessing hidden form fields - by El Forum - 04-05-2009, 10:18 AM
Accessing hidden form fields - by El Forum - 04-05-2009, 10:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB