php - how to apply inner css in codeigniter controller single statement -


Hello guys, I know that we can apply to look at CSS, but in some cases I have to show the availability of the company or not to use Ajax. Which shows the position directly from the controller & amp; Right now, I want to apply on CSS that my code is like the above and the name of 'company name' is my name and html input tag.
  Controller: function get_companyname () {if (strlen ($ _POST ['company name']) = 5) {$ query = $ this- & gt; Company_model- & gt; Verification_com page name ($ _ POST ['companyname']); If ($ query & gt; 0) {echo "not available"; // I want to apply CSS here} and {resonate "available"; // I want to apply CSS here}}} Ajax code: $ ('# company name'). Keyboard (function ()) {var companyname = $ (this) .val (); If (companyname.length & gt; = 5) {$ ('# Companyname_status') Text ('Search ....'); If (company name! = '') {$ .post ('test', {companyname: companyname}, function (data) {// test reader (data);})}} and {$ ('# companyname_status'). Lesson ('');}}}); The admin function redirects $ ('# companyname_status').    

Change this type of status to you

  if (Strlen ($ _ POST ['companyname']) = 5) {$ query = $ this- & gt; Company_model- & gt; Verification_com page name ($ _ POST ['companyname']); If ($ query & gt; 0) {echo 1; } Else {echo 0; }}   

Post Request

  $ Post ('test', {companyname: companyname, function} {if (data == 1) {$ ('# companyname_status'). AddClass ('newclass');}}   < / Div> 

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -