admin管理员组

文章数量:1335824

I have an image javascript button that it`s not working on chrome ,

would you please helping me Thanks in advance!

here is the code:

I just hide the pop up:

Edit :

for closing I`m using this function just hide it

function hideBulle() {
    $("bullepopup").style.display="none";
    hideoverlay();
}

and here is the code for creating one box and this button

  function showBulle(obj) {
    showoverlay();
    coo =   $("content").getPosition();
    $("bullepopup").style.width = "555px";
    $("bullepopup").style.height = "555px";
    $("bullepopup").position({x: (coo.x+((650-555)/2)), y: (coo.y+(440-250)/2)});
    $("bullepopup").style.display="";
    $("bullepopup").set('html','');
    new Element('img',{src:'images/br588.gif',styles: {float:'right',cursor:'pointer'},
                            events: {
                                click: function(){
                                hideBulle();
                                }
                            }
                        }).inject($('bullepopup'));

    new Element('br').inject($('bullepopup'));

    new Element('div',{html:obj.get('html')}).inject($('bullepopup'));
}
function hideBulle() {
    $("bullepopup").style.display="none";
    hideoverlay();
}

Thanks in advance!

I have an image javascript button that it`s not working on chrome ,

would you please helping me Thanks in advance!

here is the code:

I just hide the pop up:

Edit :

for closing I`m using this function just hide it

function hideBulle() {
    $("bullepopup").style.display="none";
    hideoverlay();
}

and here is the code for creating one box and this button

  function showBulle(obj) {
    showoverlay();
    coo =   $("content").getPosition();
    $("bullepopup").style.width = "555px";
    $("bullepopup").style.height = "555px";
    $("bullepopup").position({x: (coo.x+((650-555)/2)), y: (coo.y+(440-250)/2)});
    $("bullepopup").style.display="";
    $("bullepopup").set('html','');
    new Element('img',{src:'images/br588.gif',styles: {float:'right',cursor:'pointer'},
                            events: {
                                click: function(){
                                hideBulle();
                                }
                            }
                        }).inject($('bullepopup'));

    new Element('br').inject($('bullepopup'));

    new Element('div',{html:obj.get('html')}).inject($('bullepopup'));
}
function hideBulle() {
    $("bullepopup").style.display="none";
    hideoverlay();
}

Thanks in advance!

Share Improve this question edited Oct 11, 2012 at 18:00 Tim Down 325k76 gold badges460 silver badges542 bronze badges asked Oct 1, 2012 at 19:49 user1344851user1344851 7
  • what library are you using? That should be tagged – Ruan Mendes Commented Oct 1, 2012 at 19:51
  • what is the Element function? is that native javascript? what is inject? – jbabey Commented Oct 1, 2012 at 19:51
  • @JuanMendes I`m using /mootools-more-1.4.0.1.js that I put it already – user1344851 Commented Oct 1, 2012 at 20:01
  • @jbabey yes I create new element with new Element and with inject I will put it inside element – user1344851 Commented Oct 1, 2012 at 20:04
  • Do you want to change url of current window? As window.open('','_self',''); will make changes in own window because of self. – Anoop Commented Oct 1, 2012 at 20:09
 |  Show 2 more ments

2 Answers 2

Reset to default 6 +250

check your css with chrome developer tool , you should have some frame in your button

remove or change it

you can try this code also

window.open('', '_self', ''); //bug fix
window.close();

top.window.close() works for me. Tested on IE, FF, Chrome, Safari and Opera.

本文标签: csswindowclose() javascript code not working with chromeStack Overflow