Forum Discussion

kheatley's avatar
kheatley
Qrew Member
21 days ago

Need help resizing pop-up window

I am trying to my Change Status field to a Formula Rich Text field from Formula URL field because the popup that opens when clicked is never the correct size for me. 

This is what I was able to cobble together with my limited qb knowledge but it gives me and error saying it doesn’t allow javascript.  I can’t suss out why. Any ideas?

var text RID = If([LEAVE REQUEST - LEAVE STATUS]="FINAL APPROVAL", "", "%%rid%%");

// only displays button if decision is ‘pending’ or ‘rejected’

var text URL = URLRoot() & "db/" & [_DBID_DECISION_STATUS_CHANGES] & "?a=API_GenAddRecordForm&_fid_26=" & URLEncode ([Record ID#])& "&dfid=11" & "z=" & Rurl();

// when clicked opens popup window with DECISION STATUS CHANGES form #11 – Add Form Temp

"<a class='Vibrant Success' onclick=\"window.open('" & $URL & "','Edit','width=800,height=700')\">MAKE DECISION</a>"

// link code for popup with dimensions for width and height

  • The onclick syntax has been deprecated and blocked for several years now.  Old buttons will work but will be uneditable.

    Can you say in words the behaviour you are hoping to achieve?

    • kheatley's avatar
      kheatley
      Qrew Member

      I just want the button to add a record to different table... but...

      1. That button will not appear if Leave Status = "FINAL APPROVAL"
      2. When clicked it opens a pop-up window that I can set the width and height of
  • I use a format like this for my Formula - Rich Text to get a pop-up....
    I use a global variable to define my button styles but you can put whatever you want there...

    "<a cl='OpenAsPopup'data-height='500' data-width='775' data-refresh=true style='"& [Red Button] & "' href='" & $url & "'>" & $buttonText & "</a>"