Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: HTML5 Niggles
PostPosted: January 29th, 2014, 3:37 am 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
Just getting round to playing with the HTML5 output. It looks like most of the functionality designed in Flex works, although there are inevitably issues. A couple of things I've had problems with so far:

1. Using external scripts
I think this has been mentioned, but you seem to have to copy scripts into each pub. I have about 70 publications that use common scripting, so this will be a drag if I've understood. Is this correct? (Test attached, but you may need to import the script first).

2. Drag and drop
An issue I can easily work around, but resetting drag and drops doesn't seem to work correctly; the publication still considers them in place. This makes it difficult to count how many objects have been dropped. (Easier to see the attached than explain). Hide/Show returns them to the original position but then clicking on them again is considered a 'removal'. ResetDroppedObject doesn't seem to do anything.

These issues are in the output only.
Cheers
Dan


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

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


For this message dan1 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: HTML5 Niggles
PostPosted: January 29th, 2014, 8:23 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
1. Yes, you understanding it correctly. It's one of those things like rooting your phone - and therefore not really what Opus was designed to do. That said, because Opus has always gone beyond the box, I believe DW are looking at ways to including external scripts like they have with the HTML comments function.

That said, there is a very really possibility people will brick their applications and so it's not something that should simply be added as part of the normal feature set. There are ways around it at present but an in-built solution will be neater in the long run.

2. Update your version of Opus - we're on build 16500.

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: HTML5 Niggles
PostPosted: January 30th, 2014, 5:08 am 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
Thanks Mack.

I'm not sure I explained that correctly. I want to use external ils/txt scripts just so I can include them in a number of publications, as I do when using Opus or Flex. If I make them internal then each change will have to be replicated 70 times. I'm not bothered what happens once the output file is compiled. It's just that Opus doesn't seem to pick them up if they are left as an ils/txt file.

btw... the update didn't make a difference to the other problem. But thanks for the thunk - I can work around it.

Cheers
Dan

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


For this message dan1 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: HTML5 Niggles
PostPosted: January 30th, 2014, 9:54 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Ah, completely different issue...no external .ils scripts don't seem to get read into the finished solution. I'd fire off an email to support as I doubt there is a easy workaround.

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: HTML5 Niggles
PostPosted: January 31st, 2014, 5:25 am 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
Other issues:

Cloning - getting this going would really help. The Opus function doesn't work, and other things I've found on the web haven't worked. I've no idea whether to go for an HTML5 solution, or a javascript, jQuery or otherwise. Any thoughts on the best approach? Ideas appreciated.

Other problems that popped up on testing:
- Text input boxes can’t be transparent.
- Can’t type in an input box if it is part of a draggable group.
- Can’t use ‘wait’ (I think).

Cheers
Dan

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


For this message dan1 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: HTML5 Niggles
PostPosted: January 31st, 2014, 2:09 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
If you've got, or get an Evo subscription, then that section of the forum has a lot of information dealing with these advanced ideas.


I imagine that cloning is a rather niche requirement and an advanced feature to add to Opus for an initial release. You can clone DOM nodes but this may well open a can of worms that require resolving. Just web search for JavaScript + cloneNode but this really is just the first step and really relies on what you're building. Again depending on what you're building, I'd be more inclined to blend the Opus HTML5 output with (for example) JavaScript or jQuery that handled that aspect of the application. This works well on the small scale, such as list box solution used by Jan (in Evo), but could be scaled to solve a cloning (though cloning isn't necessary with HTML) problem.

Yes, the background of the Text Input box remains solid. If you look at the HTML code, you'll see that as with most elements, DW style the element using SVG and where an actual HTML element is required - such as the INPUT element used for entering text, it's part of a large group of elements. Because of this the parent frame that uses the value in Opus that controls the background is not the same as the HTML INPUT element which by default has that solid white background. It's actually one of the first problems one of my clients needed fixing - so it is possible. Use JavaScript or jQuery to locate the INPUT element and then CSS styling remove the background.

The draggable problem likely occurs because the drag functionality is taking priory over the text input focus. It does seem like something that shouldn't happen so contact DW, but you can also fix it yourself by adding a left click to the Text Input Box and then using JavaScript and the .focus() function to solve this problem.

No wait won't work. Again Evo has a discussion on this as I explained it Stephen and how you need to work around the problem. Because everybody using script in HTML5 should understand this, here's a brief analogy:

JavaScript is single threaded. This is much like have just one queue in the supermarket. Every shopper must join the same queue and will be served in order. The first person in the queue gets served first, etc, etc.

If the first shopper in the queue has a massive overflowing trolley of food to scan and pack and all the other shoppers in the queue have a couple of items in their baskets, they must wait their turn.

JavaScript works in the same way. So imagine what would happen if rather than doing their shopping, one of the shoppers just stood at the checkout and waited... In JavaScript terms, lots and lots of processes can take place in a single second - so imagine what happens if you could put just a one second delay in that system - everything stops! Good JavaScript breaks everything down into smaller process to keep that queue flowing.

This leaves the question of what happens if I need something to to occur at a later time or at a timed interval? This is where browser events come into play. They are outside of that queue and can be triggered at any time. For example:

Code:
window.setTimeout("javascript function",milliseconds);


If I use a setTimeout, the browser keeps track of the delay and triggers the named function when that delay is complete. Then that process is added to queue and when it reaches the front, is processed.

Delve into the Opus.js script and you'll see how DW use this process with the setInterval timer event to control the sequencing (and delay) of actions. It does come with an implication though:

If you trigger a timer event frequently enough, when the named function is called and the process added to the queue, there may already be too many other processes in the queue for your functional call to be processed at the correct time.

Mack
https://twitter.com/imsmackavi

_________________
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: HTML5 Niggles
PostPosted: February 2nd, 2014, 4:35 pm 
Offline

Joined: January 28th, 2014, 4:38 pm
Posts: 54
Location: Czech Republic
Opus: OpusPro 9.75 - HTML5 exports, Evolution
OS: Win 7 x64 CZ
System: FUJITSU
Hi, I've the same problem with Drag&Drop (HTML5 export, the latest build of OpusPro 9.02).

Hide/Show is a nice trick but when using more drop fields in a question (like a predefined questions from the menu) it is not accepting Drag objects on new drop positions. Drop fields are accepting only drag objects which were dropped on their position before show/hide action.

Ota


For this message ovo has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: HTML5 Niggles
PostPosted: February 3rd, 2014, 1:40 am 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
Thanks Mack - you're a legend :)

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


For this message dan1 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: HTML5 Niggles
PostPosted: February 9th, 2014, 11:11 pm 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
Post Web Data.... anyone use a fix for the same-origin policy? Browsers won't let you retrieve data from another domain, so the URL in the Post Web Data action must be the same domain as the one where the page is hosted. In Flash/Flex, you could set the security to bypass this, so I sometimes ran larger files from a cloud provider rather than my domain. I'm wondering about postMessage()?

PS. www.mydomain.com is also treated differently to mydomain.com. The publication just stalls if this is set incorrectly.

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


For this message dan1 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: HTML5 Niggles
PostPosted: February 10th, 2014, 10:11 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
There are several different methods - though some are more 'hacks' than actual solutions.

Officially use CORS. Though the PHP Proxy method works well in some situations.

Remember that the same origin security policy is there for reason, so best to double, double check that any method doesn't open a hole in your design such as remote execution using JSONP.

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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 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