Forum Discussion

TonyTony1's avatar
TonyTony1
Qrew Cadet
8 years ago

URL Button to show a form element in pop up window?

Basically, this is just an aesthetic request.  How can I have a javascript window to pop up and show a specific field?  ie

<button: Show name >

Pop up window:
George Washington

11 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Yes, this can be done, but I'm sure you are looking to show more that just a name.  Do you have any more details of what you are trying to do?
  • Just a button that when pressed a small pop up appears with the information within that field shows up.  That was just an example.  

    Thanks
  • Tony,
    Here is a low tech solution which does not require javascript.

    Make a URL formula button set to open in a new window (there is a checkbox for this)
    URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & totext([Record ID#])

    This will not be a small pop up though, it will be a new tab and it will open up form ID# 10 which would be a new super mini form why just that field on it.

    if you like you can put this Text formula button with html enabled on the form to help the user easily close the Tab.  I'm not 100% sure it works on all Browsers, you would need to test.

    var text URL = "JavaScript:window.open('','_parent','');window.close();";
    var text Image = "<img src=https://images.quickbase.com/si/48/832-close.png>";

    "<a href=" & $URL & ">" & $Image & "</a>"
  • Mark, is there an option to open the pop up form in edit mode? And could this be shrunken window just big enough to show 2-3 fields?  
  • If you change the dr to er here URLRoot() & "db/" & dbid() & "?a=dr&dfid=10&rid=" & totext([Record ID#]). It will open in edit mode.

    Sorry , but I do not know how to make it open in a smaller popup box.

    I belive that I do have code for a big X so the use has something to big click in to close the new tab. I can look for that if you need it.
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    If you want to open a small pop-up window via an HTML text page, you'll want to use a combination on 

    onclick=\"var a=window.open('"&URLRoot().....

    and

    'newwindow', 'width=600,height=200');

    The URL would direct to your specific form, and the new window call would make it a pop-up, and then jsut set your size.
    • BradElmore's avatar
      BradElmore
      Qrew Assistant Captain
      Matthew,

      I'm using a URL formula field to build a URL link to an external site.....I would like to create a Text formula field that uses the code you suggested to open my [URL formula field] into a pop-up window. Would you mind sharing with me what the code would be -- that I would need to use within my formula text field? thank you!
  • Matt, sorry took a while to thank you. Could you advise how to set it up, I mean, how to use the syntax you have kindly sent.