Go to URL with Javascript

  • 1
  • Question
  • Updated 1 year ago
I have the following URL I would like to use in the "Go To URL" so the page opens in a popup after pressing a button.

<a href="javascript:void( window.open( 'https://form.jotform.com/73115454712148', 'blank', 'scrollbars=yes, toolbar=no, width=700, height=500' ) )">Ask A Question</a>

1.  Can this be done
2.  Is there a video or instruction on how to achieve?
Photo of Bill Fox

Bill Fox

  • 7,954 Points 5k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
You should be able to make a snippet then call the snippet from your action sequence instead of the go to url. See this post:
https://community.skuid.com/skuid/top...
Photo of John Dahlberg

John Dahlberg, Champion

  • 2,442 Points 2k badge 2x thumb
You can call the action framework declaratively with the button component to generate the popup.  Then in the popup, add a template component and pull the page in with an iFrame.  iFrames do need a little tinkering to look right on the popup and here's some css to get you started.  Also, here's an example of the html that would go in the template

<iframe class="iFrame-responsive" src="https://form.jotform.com/73115454712148"; />


.iFrame-responsive {
  width:100%;
  height: 70vh;
  margin: 10px 0;
  overflow: auto;
  position:relative;
  border:none;
}
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
John is correct if the site you are framing is iframe compatible which I find many are not. This also confines the pop up to be an overlay on top of your main page and can’t function as a separate window. Provided these things are good for your use case, John’s option is probably best. Otherwise I have found opening the site in a new tab or using the JavaScript pop up to be more effective.
Photo of John Dahlberg

John Dahlberg, Champion

  • 2,442 Points 2k badge 2x thumb
This is a good callout.  I prefer to only use iFrames when there's a discreet function that I want to integrate into the skuid experience.  If it's a full blown site, it's much cleaner to open a new page.