Change the event hooked to a themeable button
Posted: Thu Mar 26, 2026 4:32 am
Hi Everybody,
I have a Themeable Button on a website. The value of that button is established by a PHP variable:
Button value = "Log In" or Button Value = "Log Out".
Works fine.
So now the action to that button is dependant upon the value of $myLogValue I need to include this javascript to the
Themeable Button:
How can I go about inserting that code in the event tab of the Themeable Button?
I have a Themeable Button on a website. The value of that button is established by a PHP variable:
Button value = "Log In" or Button Value = "Log Out".
Works fine.
So now the action to that button is dependant upon the value of $myLogValue I need to include this javascript to the
Themeable Button:
Code: Select all
var btnValue = $('myLogValue').val();
if (btnValue == 'Log In') {
// Action for first value
login.php;
} else {
// Action for second value
logout.php;
}