View widgets.js
$(function() {
'use strict';
var updateWidgetPreview = function() {
var iframe = $('#previewiframe');
var form = $("#previewform");
if (form.length == 0) {
form = $("<form/>", {id: "previewform", action: iframe.data('url'), target: "previewiframe", method: "GET"});
form.hide();
form.appendTo(document.body);