Welcome Guest, Not a member yet? Register   Sign In
javascript in CI
#1

Hello,

I am translate this html code to codeigniter but do not know how to do so?  Can anyone help me out?

demo01.html


PHP Code:
<div id="menu"></div>

<
div id="intro">
By calling the nicEditors.allTextareas() function the below example replaces all 3 textareas on the page with nicEditorsNicEditors will match the size of the editor window with the size of the textarea it replaced.
</
div>
<
br />

<
div id="sample">
<
script type="text/javascript" src="../nicEdit.js"></script>
<
script type="text/javascript">
    
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</
script>

<
h4>First Textarea</h4>
<
textarea name="area1" cols="40"></textarea>
<
br /> 


views/addpages.php


PHP Code:
<script type="text/javascript" src="<?php echo base_url(); ?>assets/NiceEdit/niceEdit.js"></script>
        
                
        
<script type="text/javascript">
            bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
        </script>
    
    
</head>
    <body>
    <br>
    
    
<?php include('navigation.php'); ?>
    
    <div id="menu"></div>
    
    <div id="sample">

    <textarea name="area1" cols="40"></textarea>
    <br /> 


How to translate this :


<script type="text/javascript">
            bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
 </script>


to CI javascript?  Please help me edit the below code so that it is the same meaning as the above javascript.



PHP Code:
<?php
        
        $this
->load->library(
        'javascript',
        array(
                'js_library_driver' => 'scripto',
                'autoload' => FALSE
            
)
        );
        
?>
" If I looks more intelligence please increase my reputation."
Reply




Theme © iAndrew 2016 - Forum software by © MyBB