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

Don't put jQuery in your controller, but in your view.
Let the jQuery script call your controller script (via AJAX) to fetch the active company name.
Your AJAX function (controller) returns the company name.
On success, jQuery replaces the button's text with that.
There are numerous examples of AJAX (in combination with CodeIgniter) on the internet.

Don't forget to give the button element it's own id. That way, you don't need functions like FIND to refer to it.
Reply


Messages In This Thread
RE: How to change the text on a button progamatically? - by Wouter60 - 01-07-2018, 11:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB