on 09-23-2004 8:51 AM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I use a string variable to store the message generated in the first page, then I send it to the next page via parameters. The problem I find is that I don't know how to resize the second page to display it as a small popup windows, just like the javascript method window.alert().
First, the message is generated:
page->messages->add_message(
condition = 'condition'
otr_alias 'ZPQT/TEXTALIAS'
severity = page->messages->CO_SEVERITY_ERROR ).
Second, the message is stored:
message = page->messages->assert_message( 'condition' ) .
Finally, I displayed it with javascript utility:
<script javascript>
window.alert( "<%=message%>" ) ;
</script>
But I wanted to display a different format of popup page, creating it as a BSP page with its own design.
I have done it but can't find the way to stablish the properties of the page (size, menu bar, etc) Just as we do with javascript utility "window.open(,,,)"
Thank you very much.
i think you cannot change the window size with ABAP.
The only way to influence it is to use window.open() to open a new window or maybe window.resizeTo(...) to resize the existing window.
(check http://de.selfhtml.org/javascript/objekte/window.htm#resize_to )
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.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.