Disable 'Leave page?' popup - service portal catalog item

sana11
Kilo Guru

Hi All,

I have created a custom list collector in service portal same as OOB list collector .

find_real_file.png

Its working fine I can able to move data from left to right and right to left.

The issue am facing is ,Whenever I place a request after clicking check out button , am getting 'Leave page?' popup.

find_real_file.png

I know because of this custom widget only am getting it and may be while submitting some scope values are still there in this widget.

I don't want to show this `Leave Page` popup only to this widget.

Is there any way to disable it?

I tried with  g_form.modified=false; in widget client script but its not working.

Can anyone help me to fix this?

 

Thanks in Advance!

 

3 REPLIES 3

nayanawadhiya1
Kilo Sage

This Pop-up is appearing because you are setting some values on the catalog fields using OnLoad Client Script without checking that field is having any value or not.

So check for the OnLoad Client Script.

 

If this was helpful or correct, please be kind and remember to click appropriately.

ah16
Mega Expert

Can you share how did you solved this issue? I have the same issue.

Regina Phalange
Kilo Contributor

Hi,

I had the same issue. Slushbucket/List collector from some reason triggers changes on Form even though no changes were really made. So, for GlideModal annoying widnow "Leave page" pops up everytime I want to Leave the form.

 

This is my solution:

// HTML
<g:ui_slushbucket id="myslushbucket"></g:ui_slushbucket>

//Client
$j('#myslushbucket_right').change(function() { 
  if((typeof g_form != 'undefined')){
      g_form.modified=false; 
  }
}).trigger( "change");