Thursday, September 4, 2014

onClick selected value in input box Java script

Standard



i  have div, which has one input box and it generates some values in <ul><li> through ajax, now I wanted to select one of the values from <li> and set it in that input box using simple javascript.






html Code:

    
  • 1
  • 2
  • 4
  • 4
  • 5

JS Code:

Wednesday, September 3, 2014

CHtml - textField () YII

Standard


Example 1: Create a blank text field

 

RESULT

 




Example 2: Create a text box with the name and Value

 



RESULT

 




Example 3: Create a text box with custom attributes: id, width, maxlength

  'id' ,    'width' => 100 , 
        'maxlength' => 100 )); ?>

RESULT

 




Example 4: Create a text box with the attribute disabled. 

  True)); ?>

RESULT

 

      

Tuesday, September 2, 2014

add JS message for view YII

Standard


This will sample code for how add pop up message for YII Submit button



JS code :



 HTML code :
isNewRecord ? 'Create' : 'Save',array('title'=>"Edit",'id'=>'myButton')); ?>