2 Replies Latest reply: Dec 10, 2010 8:19 AM by Goran Korsgren RSS

    msgbox in AjaxZFC client

    Goran Korsgren

      Has anyone been able to get msgbox to work in an AjaxZFC client?

       

        • msgbox in AjaxZFC client
          Miguel Angel Baeyens de Arce

          Hello Goran,

          I've used instead a visible/hide textbox set in a very high layer, so it's always displayed over the objects. Using a button with a simple macro to set one variable (say vVisible) to 1 or 0 and set this textbox to show conditionally based on that variable will do the work.

          Macro code for button might look like as follows

           

          Sub ShowText set vis = ActiveDocument.Variables("vVisible") val = vis.GetContent.String if val = 0 then ActiveDocument.GetSheetObject("IDXX").SetLayer 10 vis.SetContent 1, true else ActiveDocument.GetSheetObject("IDXX").SetLayer -10 vis.SetContent 0, true end ifEnd Sub


          Although it's not properly a msgbox, it will display any message and it may trigger some otehr actions.

          Hope that helps.

            • SV:Re: msgbox in AjaxZFC client
              Goran Korsgren

              Thanks Miguel,

              I take your answer as a confirmation that the vb function msgbox does not work for ajax.

              The code you submitted works as a workaround, (at least for msgboxes without yes/no-buttons)

              but I omitted the SetLayer lines and instead placed the IDXX-object at the "Top" level layer, like this:

               


              Sub ShowText
              set vis = ActiveDocument.Variables("IDXX")
              val = vis.GetContent.String
              if val = 0 then
              vis.SetContent 1, true
              else
              vis.SetContent 0, true
              end if
              End Sub