Tools to Capture and Convert the Web

How do you dynamically set the URL in the JavaScript API?

Unfortunately you can not add script tags to the innerHtml of a element directly as the browser will not execute the JavaScript code. Instead to add a script tag dynamically the tag needs to be added to the DOM.

This is illustrated in the small example below, using the GrabzIt JavaScript Library.

<script src=""></script>
<div id='insertCode'></div>
<script type='text/javascript'>
// Get the value from input box or link
var url = ''
GrabzIt("Sign in to view your Application Key").ConvertURL(url).AddTo('insertCode');
Try all our premium features for free with a 7 day free trial. Then from $5.99 a month, unless cancelled.
  • More Captures
  • More Features
  • More API's
  • Bigger Scrapes
  • Bigger Captures
  • Bigger Everything
Start Free Trial