Hi all. I need to fix a bug in a code, it is not displaying properly (it appears in the upper-left corner and when I try to click on it, the page reloads). I cannot figure it out myself. Please help.

<div class="btn_center" style="padding: 0 0 10px;">
    <fieldset>
        <div class="edit_entry btn_sm_sp" onclick="$j('#table-list').editGridRow( 'new', {'width':500, 'url': '<?=$this->baseUrl."/admin/product/category-create"?>'} );">
            <span><span><span><?php echo $this->translate->_('add_product');?></span></span></span>
        </div>
    </fieldset>
</div>
Member Avatar for LastMitch

Hi all. I need to fix a bug in a code, it is not displaying properly (it appears in the upper-left corner and when I try to click on it, the page reloads). I cannot figure it out myself. Please help.

It maybe a CSS issue if it appears upper left corner (or that is what you want or not want?)

The onclick() looks weird it should look like this:

<div class="edit_entry btn_sm_sp" onclick="table-list();">

This is the function for tit:

function table-list() {
   //your data - open url
}

I know you post the html code but how does it reload? Where is this:

jQuery('#table-list').jqGrid({'you data'});

It should just look like this meaning the line code I provided above should be part of this code too:

 $(function () {
    $('button.<?php $this->baseUrl."/admin/product/category-create; ?>').bind('click', function() { 
        $('.open.<?php echo $this->translate->_('add_product');?>').show();

Thank you, LastMitch. It is a CSS issue and has been solved accordingly.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.