Tag Archives: script

Javascript buttons for navigation

Here is an example of how you could use javascript buttons on a page. Inside a info node on the page if you add the name of your function. ^mainpage()^ In a script node if you name the function the same and enter the code – function mainpage() { var outputHTML = “”; outputHTML += […]

Read More

Custom navigation button labels

This will let you change the label on a navigation button during a survey. Select survey settings, layout and inside the next button label put – ^f(‘nextBtn’).valueLabel()^     Within the survey you will need a hidden single question called – nextBtn This will need to have the required labels for the button Then script node to […]

Read More

Visual Countdown for open text field length

This will show you how to add a twitter like character count down on to any open question within your survey. First off we want to enable the jquery library in your survey. Survey themes, select the one you are using. In the external Javascript URL paste this address into it //ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js This script will […]

Read More

Add Print & date to reportal Page

Here is a quick and simple way to add in a print link and date to a reportal page. The print this page is a link which will open up the print dialog in your browser. Example below Script below <div class=”noprint”><a class=”strapline” href=”javascript:window.print()”>Print this Page</a></div> <script language=”Javascript”> <!– var now = new Date(); var […]

Read More

IP Address and Rendering

Capture IP addresses This script will pick up the IP address of the user and set the rendering mode – f(“user_IP”).set(RequestIP()); f(“user_device”).set(GetRenderingMode()); var getMobCode = GetRenderingMode(); var getAll = Request.ServerVariables(“ALL_HTTP”); f(“storeHeaderInfo”).set(getAll); f(“detectDevice”).set(getMobCode); Just make sure you have the variables ready for this data to be set in.

Read More

Count answered questions

Simple way to add a number value to count the number of questions answered. This will then place the count answer into a variable. Here is a simple script. var qanswer = f(‘qnr_countquestions‘); var i = 0 ; if(f(‘qnr_questionsone‘).toBoolean()){   i = i+1; qanswer.set(i);       } if(f(‘qnr_questiontwo‘).toBoolean()){   i = i+1; qanswer.set(i);   […]

Read More