1

Topic: Removing the "Are you sure you want to navigate away" confirmation.

How do I remove this confirmation? I've hooked up my own confirmation that does custom cleanup. Because tinymce has a confirmation too, two confirmations are asking the user if they want to leave before saving. how do i remove tinymce confirmation?

Thanks,
John

2

Re: Removing the "Are you sure you want to navigate away" confirmation.

there must be some type of setting to fix this... any ideas?

3

Re: Removing the "Are you sure you want to navigate away" confirmation.

bump... - someone must know how to do this...

4

Re: Removing the "Are you sure you want to navigate away" confirmation.

In the init, remove autosave from the plugin-list.

5

Re: Removing the "Are you sure you want to navigate away" confirmation.

The autosave plugin isn't added to the init:

tinyMCE.init({
            mode : "exact",
            theme : "advanced",
            plugins : "safari,iespell,preview,contextmenu,paste,fullscreen",
            theme_advanced_buttons1 : "bold,italic,underline,|,fontselect,fontsizeselect,cut,copy,paste,pastetext,pasteword,|,undo,redo,|,forecolor,selectall,removeformat,iespell,fullscreen",
            theme_advanced_buttons2 : "",
            theme_advanced_buttons3 : "",

I also checked to see if the autosave plugin was being attached. The js files aren't being loaded and I commented out the code that loads the plugin. The message still appears. This message isn't the same as the autosave message which gets it's message text from the en.js file.

the autosave message is:
autosave:{
unload_msg:"The changes you made will be lost if you navigate away from this page."
}

The message I'm receiving is:

"Are you sure you want to navigate away from this page?

Press OK to continue, or Cancel to stay on the current page."

-I'm pretty lost to where this message is coming from...

6

Re: Removing the "Are you sure you want to navigate away" confirmation.

Maybe from your browser?

7

Re: Removing the "Are you sure you want to navigate away" confirmation.

Hi Arsen7,

Could you expand on this a bit? Not sure what you mean. I'm using FireFox 2.0. This message only comes up when I'm using the tinyMCE text editor.

Thanks

Last edited by ccmint (2008-07-14 18:15:35)

8

Re: Removing the "Are you sure you want to navigate away" confirmation.

Could a developer chime in and give me some guidance? Thanks.

9

Re: Removing the "Are you sure you want to navigate away" confirmation.

bump... no one else has run into this problem?

10

Re: Removing the "Are you sure you want to navigate away" confirmation.

If the autosave plugin isn't loaded then there is some other script that tinymce producing the beforeunload message.

Best regards,
Spocke - Main developer of TinyMCE

11

Re: Removing the "Are you sure you want to navigate away" confirmation.

I've been searching for the text that is in the confirmation message and cannot find where it's located. I've even used Visual Studio 2008 and NotePad++ search in files to look for "Are you sure you want to navigate away from this page?" and it comes up with nothing. I have no clue where this confirmation is being hooked up. anyone have any ideas? I'm lost.

12

Re: Removing the "Are you sure you want to navigate away" confirmation.

This is in the browser. It's a feature if you set window.onbeforeunload = function() {return false;}; it will present that message.

Best regards,
Spocke - Main developer of TinyMCE

13

Re: Removing the "Are you sure you want to navigate away" confirmation.

Thanks Spocke, that's the conclusion I was leaning toward after not finding anything in the tinyMCE doc/source.

14

Re: Removing the "Are you sure you want to navigate away" confirmation.

To remove the confirmation, in the initial configuration ( tinyMCE.init({... ), you add:

autosave_ask_before_unload: false,