Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 12:16 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Problem Displaying htm Page in Browser
PostPosted: March 31st, 2017, 10:07 am 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Dear All
Having trouble loading an htm or html into a Browser object.
This is the method I used:
    Name of File = Version History.htm
    File Location = C:\ProgramData\Myapp\Resources\Documents
    Publication Variable Name = "ReleaseHistory"
    Initial Value for Text Variable = <SYSTEM_PUBLICATION_DIR>+"\\Resources\\Documents\\Version History.htm"
    Browser Name = Browser 12
    Page Actions: On Show | Navigate to Variable ["ReleaseHistory"] with "Browser 12" selected

The page displays but the Explorer object remains empty
What am I doing wrong?
Thanks
Pakapaka


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: March 31st, 2017, 11:16 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
It can be tricky, but this works on my system at least:

1. Script Object Action First:
Code:
myPath = "file://" + SYSTEM_PUBLICATION_DIR+ "Resources/Documents/Version History.htm"


2. Then Navigate to myPath Variable Action

</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: Problem Displaying htm Page in Browser
PostPosted: March 31st, 2017, 4:12 pm 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Nope..that didn't work

This is the script I added to the OnShow action
Code:
myPath = "file://" + SYSTEM_PUBLICATION_DIR+ "Resources/Documents/Version History.htm"


Then navigated to the myPath ...(Publication Variable)
The browser remains empty


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: March 31st, 2017, 5:46 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Here's my example:

Go to the files section of our website and enter the code browser-v1@digitalgrapevine.info to download.

</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: Problem Displaying htm Page in Browser
PostPosted: March 31st, 2017, 7:53 pm 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Hi Mack
Thanks for the example...works well:)
Was wondering if it is possible to modify the "default scrollbar of the Browser control" (ie change the color) similar to the generic Opus scrollbar object

...and also if the Opus Browser can be displayed "flat" without the "beveled" frame

Thanks
Pakapaka


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: April 2nd, 2017, 1:17 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
My understanding, which could be very wrong, is the browser object is something like an OLE component that sits on-top of the Opus publication and has limited interactions with the core Opus functionality.

From memory, it's been problematic and something I have avoided using (with the exception of HTML5) and I think there should be old posts on the subject. I don't recall if there are solutions to the questions you asked and given my memory of the problems, I'd be inclined to launch an actual web browser with the content instead.

But if you are going to try, then it would probably be best looking at the CSS style rules of the HTML content first.

</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: Problem Displaying htm Page in Browser
PostPosted: May 14th, 2017, 1:01 am 
Offline

Joined: February 17th, 2012, 8:53 pm
Posts: 4
Opus: Pro 9.75
OS: Windows 10
Cheers, Mack:

I am having the same problem with the Browser Object not opening the specified htm page in a published project. I downloaded your browser project and found that the Version History.htm file opens fine in preview and when the local file path is specified in the script but not in the published project (just get a black screen with no error message). I copied your script in my project with the same result. It's almost as though the SYSTEM_PUBLICATION_DIR variable is not working--but I'm sure that can't be it. Any idea what could be causing this not to work?

Thanks so much for any help you might offer.
Scott


For this message scotstew has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: May 14th, 2017, 7:29 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
That also works fine here. You are copying the Recourses folder with the HTM file and also copying the ILMOle.dll to the publication directory.

</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: Problem Displaying htm Page in Browser
PostPosted: May 14th, 2017, 8:05 pm 
Offline

Joined: February 17th, 2012, 8:53 pm
Posts: 4
Opus: Pro 9.75
OS: Windows 10
Thanks much, Mack. I copied the ILMOle.dll to the publication directory and made sure the htm file I'm trying to open in the browser object is in the Resources folder that Browser1 is pointing to and published as HTML5 ... and when run the browser object frame is blank--no "Hello World."

I'm still just missing something in the configuration. This is my first attempt to link to an offline htm file.

Thanks again,
Scott


For this message scotstew has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: May 15th, 2017, 2:42 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Here's the published version, working on mine, try that and see what happens:

download from: http://www.live.interaktiv.co.uk/?section=files

file code: browser-published@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


Top
 Profile Visit website  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: May 15th, 2017, 7:39 pm 
Offline

Joined: February 17th, 2012, 8:53 pm
Posts: 4
Opus: Pro 9.75
OS: Windows 10
Thanks for the file, Mack. It works fine when published as a standalone exe but not when published as an HTML5 web publication for a WBT project. When I click the button to launch the html file in the viewport, the status bar reports "Loading... file://resources/Documents/Version History.htm" and the viewport remains blank. Is there another step for web publications?

Thanks again,
Scott


For this message scotstew has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Problem Displaying htm Page in Browser
PostPosted: May 15th, 2017, 10:26 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
The post above have nothing to do with HTML5 - they are a different kettle of fish.

The browser object in Opus HTML5 is outputted to an iframe element and access to the local file system will have limitations. Additionally, Opus has an annoying niggle that it assume the URL will be an absolute path.

One solution is to work with JavaScript directly. Create the browser object and leave the path blank. Then add a trigger with an OpusScript action and use the following code:

Code:
document.getElementsByTagName("iframe")[0].src="resources/version-history.htm";


This assumes the version history file is in a subfolder of the main publication folder.

It also assumes there is only ONE browser object - hence getting the iframe directly as an element rather than locating it from it's parents ID.

</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: Problem Displaying htm Page in Browser
PostPosted: May 16th, 2017, 2:52 am 
Offline

Joined: February 17th, 2012, 8:53 pm
Posts: 4
Opus: Pro 9.75
OS: Windows 10
Worked like a charm, Mack. Can't thank you enough for your gracious help and patience.

All the best to you,
Scott


For this message scotstew has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 26 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group