Welcome Guest, Not a member yet? Register   Sign In
how to put javascript calendar on CI ??
#1

[eluser]yudahebat[/eluser]
I have a function on controller like this
Code:
function Adminpage()
    {
        parent::Controller();
        $this->base    = $this->config->item('base_url');
        $this->css    = $this->config->item('css1');
        $this->js    = $this->config->item('js');
        $this->menu = $this->menu->menu_adm();
        $this->load->model('Crud');
        $user_table = 'users';

    }

and the view form

Code:
<?    $attributes = array('class' => 'cssform', 'id' => 'myform', 'name' => 'myform');
        echo form_open('/adminpage/create_news/', $attributes);
        echo form_hidden('id', '');
        echo '<p>';
        echo form_label('Tanggal', 'tanggal');
        echo form_input('tanggal','');?&gt;&nbsp;
        <a href="&lt;?=" title="select your arrival date"> <img src="&lt;?=" alt="select your arrival date date" border="0" height="16" width="16"></a>
    &lt;?    echo '</p>';
        echo '<p>';
        echo form_label('Judul', 'judul');
        echo form_input('judul','');
        echo '</p>';
        echo '<p>';
        echo form_label('Isi', 'Isi');
        echo form_textarea('isi','');
        echo '</p>';
        echo '<p>';
        echo form_label('Upload Picture', 'up_pic');
        $data = array(
            'id'   => 'photo',
            'name' => 'photo',
            'value'=> ''
            );
        echo form_upload($data);
        echo '<div id="error2">';
        echo $this->session->flashdata('error_text');
        echo '</div>';    
        echo '<p></p>';
                                                        
            echo '<div style="margin-left: 160px;">';
            $data = array(
            'id'   => 'submitbutton1',
            'value'=> 'Create',
            );
            echo form_submit($data);
            $data = array(
            'id'   => 'submitbutton1',
            'value'=> 'Reset',
            );
            echo form_reset($data);
            echo '</div>';
        
        echo form_close();
    ?&gt;

I put my javascript file on root
/js/datetimepicker.js

my Problem is, the javascript calendar didn't appear when I click the image off calendar that I link to the javascript file
how to fix it????
#2

[eluser]Thorpe Obazee[/eluser]
I honestly don't get what you are asking. It might just be me but you need to layout your problem better.
#3

[eluser]yudahebat[/eluser]
where is my javascript code??? why it disappear??? i've already put it on controller that I upload..




Theme © iAndrew 2016 - Forum software by © MyBB