921
Views
1
Comments
Solved
How can I change the title of popup window
Question

I open a popup window with title as "Order Line".

I want to change the title of of popup with out closing it so that my pop remains popup open and I move to other screen on the same popup. I tried to get the Title span by class or id change the innner html /text. 

I could not make it work as it is not finding the element (span).  

When try using os JS but in that case also it does not work. 

Has anybody done this before. 



mvp_badge
MVP
Rank: #6
Solution

Hello Shailendra.

First, I'll say that I agree with Kilian. I would say that close the popup and open the new one is the way to go.
Better user experience. Don't overlook this.

But it is possible to do what you want. See my OML.
You need to find the element in the main page, as it is not inside the popup.

A notify in the preparation of the second Popup do the trick.

https://eduardojauch.outsystemscloud.com/PopUpTitleTest/Home.aspx?_ts=636619716018461155

Cheers.

PopUpTitleTest.oml

Rank: #17845

You can change popup title in a parameters in bottom right corner:

Rank: #12026

Jakub Góralski wrote:

You can change popup title in a parameters in bottom right corner:

Thanks for your reply but that does not help. I want to changed it once it is already open. 


Rank: #410

Try using code injection with javascript: 


document.title = "This is the new  page title.";

Rank: #12026

I want to change the title of this popup window. Order Line needs to be changed  to new title . 

Both the suggested approach does not work. 


Rank: #677

Shailendra Bais,

Let me see if understand it correctly, you want to navigate to another screen inside your popup "Order Line", right?


Have you tried to change it on developer tools in your browser and then replicate it on javascript code?


Abílio Matos

Rank: #12026

I tried that but even document.getEleementbyid('id') does not work , even when id is there for the title

mvp_badge
MVP
Rank: #2

Hi Shailendra,

The title of a pop-up is not meant to be changed. A pop-up should be used for simple data entry, and is typically used to edit the data of a single row from a table, or create a new item of some sorts. Therefore, the title will typically be something like "Create new item" or "Edit item xxx" or the like, and there is no need to change it.

Can you explain why you need to change the title?

Rank: #29679

Kilian Hekhuis wrote:

Hi Shailendra,

The title of a pop-up is not meant to be changed. A pop-up should be used for simple data entry, and is typically used to edit the data of a single row from a table, or create a new item of some sorts. Therefore, the title will typically be something like "Create new item" or "Edit item xxx" or the like, and there is no need to change it.

Can you explain why you need to change the title?

 

I disagree.  I use Modal Popups for both Create New and Edit functionality on simple records.  Changing the title would be a nice way to show the window in either "New" or "Edit".

Rank: #12026

I have two popups and both can open individually by clicking two different links in the list of order line but one can traverse from one popup to other . 

I can close the first one and open the other but I do not want to do that  as I want to to keep the user on the same popup as other will also be open as popup.

Please suggest as if know the solution 

Rank: #17845

You can change Popup Title to none, or something in the generally meaning, like 'configuration' or just 'order'.

Then, in a Popup Content you can take an Expression as a header and change value there in case you need.

I know, it's not a solution but some idea.

Btw. When Outsystems doing a lot of thing instead of you, then you have less posibilities to make your application special. :)

Rank: #12026

Jakub Góralski wrote:

You can change Popup Title to none, or something in the generally meaning, like 'configuration' or just 'order'.

Then, in a Popup Content you can take an Expression as a header and change value there in case you need.

I know, it's not a solution but some idea.

Btw. When Outsystems doing a lot of thing instead of you, then you have less posibilities to make your application special. :)

It does not work this way. There is nothing you can refresh in outsystems, I mean when you change the expression .


Rank: #17845

In Screen Action you can use Ajax Refresh which would reference with Id of Container of Expression.

Rank: #12026

Header widget is not available for refresh. You can only refresh what is shown in yellow but header is beyond it.


Rank: #17845

Ok, but I suggested to leave Popup Title, and make new header with title as a Expression in Popup Content which can be refreshed. 

mvp_badge
MVP
Rank: #2

Hi Shailendra,

For a good user experience, you should never display different content in a pop-up, that's just not what pop-ups are meant for. Closing one, then opening the other may make for better user experience, as the user is better aware they're getting different content. Anyway, what you want, changing the pop-up title, is just not easily possible.

Rank: #12026

we want to change the title in title panel. Other expression in screen contents has no meaning . that is not requirement 

mvp_badge
MVP
Rank: #2

Hi Shailendra,

Just go back to whoever made the requirements, and tell them chaging the pop-up title is not possible with OutSystems.

Rank: #12026

I am looking for answer but failing in not doing so just an option which we already know but wanted to check if expert in the area can help . 

mvp_badge
MVP
Rank: #6
Solution

Hello Shailendra.

First, I'll say that I agree with Kilian. I would say that close the popup and open the new one is the way to go.
Better user experience. Don't overlook this.

But it is possible to do what you want. See my OML.
You need to find the element in the main page, as it is not inside the popup.

A notify in the preparation of the second Popup do the trick.

https://eduardojauch.outsystemscloud.com/PopUpTitleTest/Home.aspx?_ts=636619716018461155

Cheers.

PopUpTitleTest.oml

mvp_badge
MVP
Rank: #2

Cool stuff Eduardo! :)

mvp_badge
MVP
Rank: #6

Kilian Hekhuis wrote:

Cool stuff Eduardo! :)

Thanks Kilian. Hate Popups, but love to mess around with them... rs


Rank: #25209

Hello :) 

You can change the title without closing and reopening the popup.

Selecting by class doesn't work because the element is in the parent window, so you can just select it from there in your javascript:  

SyntaxEditor Code Snippet

"window.parent.$('.os-internal-ui-dialog').find('span').text('"+ EncodeJavaScript(YourNewPopupTitle) + "');"
mvp_badge
MVP
Rank: #2

Hi Dean,

First, you are replying to a post that's 1.5 years old, which usually doesn't add much to the discussion. Secondly, I think you misunderstand what the original post is about. It's not about having a different title for "New" or "Edit" (something I explicitly describe as possible and desirable, above), it's about changing the title of the pop-up while the pop-up is open. So for example, a wizard in a pop-up that displays the steps in the title, or something. As I explained, that's typically not something you'd want.

I'm going to close this topic now, as it's old and has a solution.