- Posts: 5
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<p>Random Number:</p> <p id="randomValue"> </p> <script> var randomValue = rand(0, 1); document.getElementById("randomValue").innerText = "Zufallszahl: " + randomValue; function openFullscreenPopup(url) { var width = screen.width; var height = screen.height; var popupWindow = window.open(url, 'popupWindow', 'width=' + width + ', height=' + height + ', left=0, top=0'); if (window.focus) { popupWindow.focus(); } return false; } function openVersion() { var gameVersion = (randomValue < 0.5) ? 'https://www.bing.com' : 'https://www.google.com'; openFullscreenPopup(gameVersion); } </script> <button class="my-button" onclick="openVersion(); return false;">Open in Fullscreen</button>
Please Log in to join the conversation.
$('#question{QID} :text.form-control:eq(0)').val(randomValue).trigger('keyup);
Please Log in to join the conversation.
<script> $('#question{31} :text.form-control:eq(0)').val(randomValue).trigger('keyup); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
<p>Here is the Random Number:</p> <p id="randomValue"> </p> <script> var randomValue = rand(0, 1); document.getElementById("randomValue").innerText = "Random Number: " + randomValue; $('#question{QID} :text.form-control:eq(0)').val(randomValue).trigger('keyup); function openFullscreenPopup(url) { var width = screen.width; var height = screen.height; var popupWindow = window.open(url, 'popupWindow', 'width=' + width + ', height=' + height + ', left=0, top=0'); if (window.focus) { popupWindow.focus(); } return false; } function openVersion() { var gameVersion = (randomValue < 0.5) ? 'https://www.bing.com' : 'https://www.google.com'; openFullscreenPopup(gameVersion); } </script><button class="my-button" onclick="openVersion(); return false;">Open in Fullscreen</button>
Please Log in to join the conversation.
<p>Here is the Random Number:</p> <p id="randomValue"> </p> <script> var randomValue; $(document).ready(function() { randomValue = rand(0, 1); document.getElementById("randomValue").innerText = "Random Number: " + randomValue; $('#question{QID} :text.form-control:eq(0)').val(randomValue).trigger('keyup'); }); function openFullscreenPopup(url) { var width = screen.width; var height = screen.height; var popupWindow = window.open(url, 'popupWindow', 'width=' + width + ', height=' + height + ', left=0, top=0'); if (window.focus) { popupWindow.focus(); } return false; } function openVersion() { var gameVersion = (randomValue < 0.5) ? 'https://www.bing.com' : 'https://www.google.com'; openFullscreenPopup(gameVersion); } </script><button class="my-button" onclick="openVersion(); return false;">Open in Fullscreen</button>
Please Log in to join the conversation.