Forum Stats

  • 3,873,324 Users
  • 2,266,535 Discussions
  • 7,911,506 Comments

Discussions

how to delay or dont fade the success message?

2»

Answers

  • jariola
    jariola Member Posts: 10,918 Gold Crown

    Hi,

    As I understand, you did just declare function.

    You need also execute it. See my previous answer.

    Regards,

    Jari

  • Indeed, also ensuer that you refer to the correct id, as I recall the id of the success message is "uSuccessMessage", but that might be theme dependent.

    The function APEX uses for the fade out of the success message is called autoFadeSuccess, so if you create a custom fade out function with the same name as the APEX one, your function will be called every time APEX invokes it.

    If you want to use an anonymous function, as Jari suggests, than you need to execute it yourself.

    Regards,

    Vincent

  • Gus C
    Gus C Member Posts: 1,200

    At the moment I have in my page 0 html region

    <script type="text/javascript">

    function hidemessage() {

    setTimeout("$('#success-message').fadeOut('slow')",3000);

    }

    </script>

    On page 0 I also have a DA

    Event: Page Load

    Action:Execute Javascript

    Fire OnPage Load: Yes

    Code: hidemessage();

    My first page in my app is an updateable report and the code seems to run ok,

    ie, the sucess message appears and then fades away after about 3 seconds.

    Other pages use the Skillbuiders Modal Plugin. When the success message appears

    after the modal window closes, it just stays there, it does not fade away

    Any ideas

    Gus

  • jariola
    jariola Member Posts: 10,918 Gold Crown

    Hi,

    It might that region position where your HTML region is, are not in page template?

    Anyway, I see it is better that you remove HTML region where is JavaScript function and place all code inside function to dynamic action.

    Regards,

    Jari

  • Gus C
    Gus C Member Posts: 1,200

    I have moved the code to the DA

    <script type="text/javascript">

    function hidemessage() {

    setTimeout("$('#success-message').fadeOut('slow')",3000);

    }

    </script>

    Now nothing happens.

    When I click my save button, the page does nothing

    Gus

  • jariola
    jariola Member Posts: 10,918 Gold Crown

    Hi,

    You need place only below code to dynamic action

    setTimeout("$('#success-message').fadeOut('slow')",3000);
    

    Regards,

    Jari

  • In hte dynamic action you have to remove the script tags

  • Gus C
    Gus C Member Posts: 1,200

    I have changed the code, but I am still in the same position, ie.

    the message does not fade away when using modal windows

    I have put an example on oracle.com

    Workspace: GUSCRIGHTON

    Username: [email protected]

    Password: terminator

    Application: 25851 TRAINING

    Page 1

    One region does not use modal and works

    The other uses modal and does not work

    Cheers

    Gus

  • jariola
    jariola Member Posts: 10,918 Gold Crown

    Hi,

    I did add one more true action to page one On Successful close dynamic action.

    It is not general solution but works, and anyway you have actions after modal close

    Regards,

    Jari

This discussion has been closed.