Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 18th, 2024, 11:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: “restore state and position” property not working in html
PostPosted: April 10th, 2018, 12:32 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Hi,
I'm checking the “restore state and position” property for some question and answers texts but it works only in preview not when publish to html. For example, if I click the right answer and the wrong answers disappear, then go to another page and back to this one, the wrong answers are there (they should be still disappeared). Is there nother way to make it work?


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: “restore state and position” property not working in htm
PostPosted: April 11th, 2018, 2:41 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
It would have to be done manually which at the simplest level would involve using variables to track which elements should be hidden / shown and then using triggers when the page is displayed to activate these.

There should also be a way to hack the HTML5 code to override the initial display properties. I've never had need to do this, but will have a look if I get a chance.

</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


Top
 Profile Visit website  
 
 Post subject: Re: “restore state and position” property not working in htm
PostPosted: April 11th, 2018, 5:25 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Thank you.
I'm using persistent page variables for input boxes so the text you type stay there when you change pages but I found that some actions triggered when you match the variable work and some don't. when you go to another page and back to the first one disable an object works but show and hide an object doesn't. I can't find a way to solve this.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: “restore state and position” property not working in htm
PostPosted: April 12th, 2018, 2:03 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Gotta love Opus HTML5.

It is possible to add restore state functionality. The code is:

Code:
function objectByStateVisibility(obj,state){

var o = obj.m_objectName;
var p = obj.m_parent.m_objectName

if (state == "hide") {
   window._DWPub[p][o].m_initiallyVisible = false
   obj.Hide();
   } else {
      window._DWPub[p][o].m_initiallyVisible = true
      obj.Show();
   }
}


It works by overriding the default value (m_initiallyVisible) used to build the page. It is used like this:

Code:
objectByStateVisibility(blueFrame,'hide')


Where 'blueFrame' is the name of the object and then whether to hide or show the object.

Please remember that because this is code based, you should ensure that both the page and object names are code compliant.

Download a working example from http://www.live.interaktiv.co.uk/?section=files

code: restorestate@digitalgrapevine.info

</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 : Ad Mulders


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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