This topic is locked
[SOLVED]

 How to remove the close button "X" in popup?

7/16/2020 8:20:31 PM
PHPRunner General questions
Myr0n author

HelloI am looking how can I remove the close button "X" that is in top right corner like the picture below.
Some users think that closing the windows in that way go to save the record and is not.

In the popup I only have the button <Save record>
Here is what I am using, please read the comments in the code. thank you for your help.

window.popup = Runner.displayPopup( {

width: 900,

height: 600,

modal: true, //<---- I tried this but did not work.

url: visitsURL,

afterCreate: function(win) {

window.win = win;

$("button.close").remove; //<---this code does not work here, but I have opened the popup and ran the code in the javascript console works.

},

beforeClose: function(win) {

if ($('iframe').contents().find("input#value_Name_1").val()==""){

return false;

}

else

return true;

}

});

//I tried the next code as before without any success.

$("button.close").remove; //<---this code does not work here, but I have opened the popup and ran the code in the javascript console works.



btw:I am using phprunner 10.4.35387x64

Admin 7/17/2020

The following is wrong:

$("button.close").remove;


This will work:

$("button.close").remove();
Myr0n author 7/17/2020



The following is wrong:

$("button.close").remove;


This will work:

$("button.close").remove();



I am so sorry, in the first comment is a typo, is my bad, because in my code is exactly as you suggested.
Do you think that this problem is happening because my popup is in the client after of a button?

After this

$("button.close").remove();



I have a message that is already showing even if the popup is not close.
Thank you so much for your reply.

C
copper21 7/19/2020

I asked the same question and this is my post....hopefully it helps you...
https://asprunner.com/forums/topic/27413-disable-close-button-popup/pagep91326&#entry91326

Myr0n author 7/19/2020



I asked the same question and this is my post....hopefully it helps you...
https://asprunner.co...326&#entry91326


Thank you so much.

Works very well.