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

I created a simple view to test it, and in my situation, it works:
Code:
<html>

<head>
   <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>

<body>
<h1>Test button</h1>

<div>
<button id="myCamp" class="btn pull-right btn-danger navbar-btn">Active Campaign: None</button>
</div>

<br />

<div>
<button class="make-active">Set My Campaign</button>
</div>

<script>
   $(document).ready(function(){
       $('.make-active').click(function(e){
           e.preventDefault();
           alert('You clicked on a button with the css class make-active.');
       });
   });
</script>

</body>
</html>
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB