Welcome Guest, Not a member yet? Register   Sign In
error 414 uri too long
#3

this is my js code

Code:
var News = {
    edit: function (news, newsId) {
        var overlay   = getById('overlay'),
            editPopup = getById('editPopup');

        Ajax.request({
            url: '/az/management/get_news/' + newsId,
            success: function (azData) {
                Ajax.request({
                    url: '/ru/management/get_news/' + newsId,
                    success: function (ruData) {
                        window.frames[0].document.body.innerHTML = azData;
                        window.frames[1].document.body.innerHTML = ruData;

                        overlay.style.height    = document.compatMode != 'CSS1Compat' ?
                            document.body.scrollHeight :
                            document.documentElement.scrollHeight + 'px';
                        overlay.style.display   = 'block';
                        editPopup.style.display = 'block';
                    }
                });
            }
        });

        getById('update').onclick = function () {
            /* THE PRIMARY PROBLEM IS BELOW */
            Ajax.request({
                url: '/az/management/get_news/' + newsId +
                     '/?az=' + CKEDITOR.instances['az-editor'].getData() +
                     '/&ru=' + CKEDITOR.instances['ru-editor'].getData(),
                success: function (data) {
                    if (data) {
                        _endEditing();
                    }
                }
            });
        };

        getById('close').onclick = _endEditing;

        function _endEditing() {
            overlay.style.display   = '';
            editPopup.style.display = '';
        }
    },

    del: function () {
        //
    }
};

n this is my php code

PHP Code:
public function update_news($news_id)
    {
        
$this->db->where('news_id'$news_id);
        
$this->db->set('news_text'$this->input->post('az'));
        
$az $this->db->update('az_news');

        
$this->db->where('news_id'$news_id);
        
$this->db->set('news_text'$this->input->post('ru'));
        
$ru $this->db->update('ru_news');

        if (
$az === FALSE || $ru === FALSE)
        {
            exit;
        }

        exit(
TRUE);
    } 

that's all, no view files
Reply


Messages In This Thread
error 414 uri too long - by Tecvid - 07-10-2015, 08:33 AM
RE: error 414 uri too long - by mwhitney - 07-10-2015, 09:19 AM
RE: error 414 uri too long - by Tecvid - 07-10-2015, 12:37 PM
RE: error 414 uri too long - by Tecvid - 07-11-2015, 12:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB