cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

<body style="padding-top: 50px; padding-left: 140px;">

<h3>Online ordering tool</h3>

<iframe id="iframe" src="https://moveshelf.com/embed/TW9jYXBDbGlw5cv1A_nPSCyoiJGKKXZj2Q?allowSelection=true" width="500px" height="281px" scrolling="no" frameborder="0" allowfullscreen allow="vr"></iframe>
<div class="row">
	<div class="col-4">
		<div class="input-group" style="margin-bottom: 5px">
			<div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">Start</span>
			<input id="start" type="text" value="0" class="form-control"></input>
		<div class="input-group" style="margin-bottom: 5px">
			<div class="input-group-prepend">
				<span class="input-group-text" id="basic-addon1">Stop</span>
			<input id="stop" type="text" value="0" class="form-control"></input>
<button style="margin-bottom: 5px" onclick="updateSelection()" type="button" class="btn btn-primary">Update</button>
<button style="margin-left: 5px; margin-bottom: 5px"  onclick="order()" type="button" class="btn btn-primary">Order</button>

window.addEventListener("message", receiveMessage, false);
var selectionStart = 0;
var selectionStop = 0;
var totalTime = 0;

function receiveMessage(event)
  if(event.data && event.data.type && event.data.type == 'select')
	  var elementStart = document.getElementById("start");
	  var elementStop = document.getElementById("stop");

	  saveSelection(event.data.start, event.data.end);
	  elementStart.value = selectionStart;
	  elementStop.value = selectionStop;
	  totalTime = event.data.time;


function saveSelection(start, stop)
	selectionStart = start;
	selectionStop = stop;

function updateSelection()
	 var iframeEl = document.getElementById("iframe");
	 var start = document.getElementById("start").value;
	 var stop = document.getElementById("stop").value;
	 var message = { type: 'select',
				start: start,
				stop: stop,
				useTimecode: true }

	iframeEl.contentWindow.postMessage(message, '*');
	saveSelection(start, stop);

function order()
	var time = totalTime.toFixed(2)
	alert('Thank you for ordering your mocap.\n \'Breakdance/shot1/take1\' ! \n Selection start: ' + selectionStart + '\n Selection stop: ' + selectionStop + '\n Total time ordered: ' +  time + ' s');

Loading ..................