I've stumbled on a way to display application information on the tabbedUI integrated login line, but need help updating that information. I'm working on a multi-location retail application where several sales people buy and sell goods (kinda like a pawn shop). The integrated login line has three parts, left, center and right with the login in the right part. There are properties for the left and center parts. I discovered that I can create variables in the header text area of the tabbedUI, such as
<%a5 HeaderUserDisplay = "Buyer "+alltrim(SESSION.BUYERID)+" "+alltrim(SESSION.BUYERNAME)+" | Store "+alltrim(SESSION.STOREID) +" "+ alltrim(SESSION.STORENAME) %>
then in the "Custom menu bar HTML - left" put
<span style="color:#000;font-size:14px;font-weight:bold;"> <%a5 ?HeaderUserDisplay %> | <%a5 ?DTOC(date()) %></span>
and the following shows on the integrated menu line ( this includes the center part which is done the same way).
CustomMenuBar.PNG
So, now, when a different customer comes in, I want to change the center display to show that customer's info. I have a button that does a callback to change the customer and have tried the following code:
newHeading = "<span style="color:#000;font-size:14px;font-weight:bold;">" + CustomerNameDisplay + " | " + TransactionDisplay + "</span>"
dim js as C = ""
js = "topparent.document.getElementById("tbiObj.LOGINMENU.CENTER").innerHTML = \'" + js_escape(newHeading) + "\';"
but running this javascript this does nothing. I've tried topparent, parent and no parent, and none of those work. Any of you JavaScript pros have a suggestion?
Thanks
<%a5 HeaderUserDisplay = "Buyer "+alltrim(SESSION.BUYERID)+" "+alltrim(SESSION.BUYERNAME)+" | Store "+alltrim(SESSION.STOREID) +" "+ alltrim(SESSION.STORENAME) %>
then in the "Custom menu bar HTML - left" put
<span style="color:#000;font-size:14px;font-weight:bold;"> <%a5 ?HeaderUserDisplay %> | <%a5 ?DTOC(date()) %></span>
and the following shows on the integrated menu line ( this includes the center part which is done the same way).
CustomMenuBar.PNG
So, now, when a different customer comes in, I want to change the center display to show that customer's info. I have a button that does a callback to change the customer and have tried the following code:
newHeading = "<span style="color:#000;font-size:14px;font-weight:bold;">" + CustomerNameDisplay + " | " + TransactionDisplay + "</span>"
dim js as C = ""
js = "topparent.document.getElementById("tbiObj.LOGINMENU.CENTER").innerHTML = \'" + js_escape(newHeading) + "\';"
but running this javascript this does nothing. I've tried topparent, parent and no parent, and none of those work. Any of you JavaScript pros have a suggestion?
Thanks
Comment