Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 7:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: HTML Object with output to variable
PostPosted: February 19th, 2020, 11:14 pm 
Offline

Joined: December 1st, 2016, 5:33 pm
Posts: 14
Hi

I need a slider to work in HTML5. I have some slider examples which seem straightforward. What I need is to get the output of the slider into a variable to use on an object. In this case to change the colour of an object.

Have attached a simple example.

Many thanks in advance
Stuart


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: HTML Object with output to variable
PostPosted: February 20th, 2020, 9:21 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
You can hack it by calling one of Opus' private functions:

1. Locate this bit of code in your HTML object and add the line in bold.

slider.oninput = function() {
output.innerHTML = this.value;
DWVariables.instance().setValue("myValue",this.value);
}


2. In your project, you'll need to add the variable used in that line of code - I've used myValue.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


For this message mackavi has been thanked by : Gillawa


Top
 Profile Visit website  
 
 Post subject: Re: HTML Object with output to variable
PostPosted: February 20th, 2020, 10:02 am 
Offline

Joined: December 1st, 2016, 5:33 pm
Posts: 14
Mack, as always your generosity of knowledge is amazing. Thanks again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group