Welcome Guest, Not a member yet? Register   Sign In
How to change the text on a button progamatically?
#1

(This post was last modified: 01-07-2018, 02:30 PM by richb201.)

I have a button on my page

 <button class="btn pull-right btn-danger navbar-btn">Active Campaign: Create a Campaign</button>


I like the red color! Right now it says "Active Campaign:". I want to change the text on it to be Active Campaign: company name. If a user presses an action button in my crud (below in controller), I want to run a function just_a_test2() see below. It is also in the controller.


$crud->add_action('Make Active', '\'http://www.grocerycrud.com/assets/upload...smiley.png\'', 'Configure/just_a_test2','ui-icon-plus');

function just_a_test2($primary_key , $row)
{
   <script src="  $('.selector') . find('.ui-btn-txt') . text('custom label')"></script>
}



I can't seem to get the jquery in the function just_a_test2() to run.  Can I not have a <script tag in a function in my controller? What is the tag of my Button? I think I can get the name of the company on the line that the user chose when they pressed "Make Active". Any pointers are appreciated. 



Thanks for your help. 



Rich
proof that an old dog can learn new tricks
Reply


Messages In This Thread
How to change the text on a button progamatically? - by richb201 - 01-07-2018, 02:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB