Skip to Content

using the messages-object on another page?

I used to show error messages on the top of my BSP-page by using the messages object. With <i>messages->add_message()</i>, I added the error messages and with <i>message->get_message()</i> I read and displayed them.

Now, I would like to show the messages on a popup-window that shows another BSP-page. Can I access the first page's messages object on the popup-page or is using a global messages object in the application class the only way?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Sep 23, 2004 at 01:07 PM

    The right way is to use global messages object in the application class & statefull BSP.

    Other way is to transfer message table from page to page via navigation->set_parameter

    Add a comment
    10|10000 characters needed characters exceeded

    • > Other way is to transfer message table from page to

      > page via navigation->set_parameter

      Keep in mind URL is limited to about 2Kb length. The navigation object does a browser redirect transfering the parameters via the URL (by default). Not recommended for tables.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2004 at 09:10 PM

    Daniel,

    I think it should be possible to use JavaScript to read the error message from another page.

    If, for example, the two pages are in the same frameset,

    and if the first frame contains the message element with

    id="MY_MESSAGE_ID", then something like the following could do the job:

    <script>

    <!--

    document.write(parent.frames[0].document.getElementById("MY_MESSAGE_ID-txt").firstChild.nodeValue;

    -->

    </script>

    In a popup window this will be more difficult. I know that there is something like self.creator.xxx.xxx etc., but I am not really sure if this works.

    But it's worth a try.

    Hope that helps.

    Best regards,

    Juergen

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Daniel Humberg

      No problem, I found the solution quickly to my issue:

      I use an empty bsp page called "PruebaPopUpamedida.htm"

      I use the following javascript code to calle this page and stablish its content and properties:

      And it seems it works, so thank you very much anyway, I hope I can manipulate the layout from the calling page in this script.

      Carlos.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.