Bindows and Outsysyems

Bindows and Outsysyems

  
Hi,

I am trying to use this componenthttp://www.bindows.net/free_gauges/.
I did the download and created my own gauge, which goes on grafs folder attached with the name "teste" and it works fine.

Now, I want to put it to work in OutSystems and, for that, i create the Bindows espace which is attached, but it does not work.
The only error that gives me, using the developer tools, is: "Uncaught SyntaxError: Unexpected token <"


What am I doing wrong?

Thanks
Placido

Hi Plácido,

Well, to start things off, the first thing I noticed form your example is that your expression should be
"     <script language=""JavaScript"" type=""text/javascript"" src=""" + GetOwnerURLPath() + "bindows_gauges/bindows_gauges.js"">		
	</script>
<script language=""JavaScript"" type=""text/javascript"">
var gauge = bindows.loadGaugeIntoDiv(""" + EncodeJavaScript(XmlData) + """, """+ gaugeDiv.Id + """);
</script>
"
since you should split the Javascript file import from the actual manual Javascript code in some browsers, and also since you weren't referencing the javascript file's correct path.

The second thing, though, is that in the sample file you sent, you always load the gauge as a filename, namely

bindows.loadGaugeIntoDiv("gauges/grafIntro.xml", "gaugeDiv");

In your eSpace, however, you're passing the actual XML file's code instead of a filename. Is that how the API works? Isn't it possible for you to create a file with the gauge code, and import it here?

What is currently happening is

<script type="text/javascript" language="JavaScript">
var gauge = bindows.loadGaugeIntoDiv(" \r\n\x3cGauge2 coordWidth=\x221000\x22 coordHeight=\x221000\x22 left=\x220\x22 top=\x220\x22 bottom=\x220\x22 right=\x220\x22\x3e\r\n\r\n    \x3c!-- Background --\x3e\r\n  ....etc.

which doesn't seem like the right thing to do, right?

I hope this helps.

Regards,

Paulo Tavares
Hi Paulo,

first off all, thanks for the help.

I created a new resource with the name: gauges/grafIntro.xml, this file contains the gauge code, and i change the scrypt to:

" 
  <script language=""JavaScript"" type=""text/javascript"" src=""" + GetOwnerURLPath() + "bindows_gauges/bindows_gauges.js"">		
  </script>

  <script language=""JavaScript"" type=""text/javascript"">
    var gauge = bindows.loadGaugeIntoDiv(""" + GetOwnerURLPath() + "gauges/grafIntro.xml"" , """+gaugeDiv.Id+""");
  </script>
"
and now there's no erros... But still not working.

any idea?

Plácido Miranda

 

Hi Placido,

Given that I never worked with Bindows, I'm just testing as I go. :)

Could you send us the eSpace so maybe someone can see what might be the problem?

Regards,

Paulo Tavares
Hi paulo,

here is the space, thanks for the help.

Regards,
Plácido
Hi Plácido,

For all intents and purposes, the results I get from running your eSpace in Firefox is that it works as expected.

However, running it in Chrome doesn't, and on IE it returns an error.

As such, I tried to open your teste.html file in Chrome and IE as well, and to my surprise the results were equal as well: teste.html only works on Firefox in my system. In Chrome it doesn't show anything, and in IE it gives the same error as the eSpace does, which is "Access is denied".

I'll suggest looking into your teste-html file first, and make sure it works properly in the 3 browsers. After that, it should be easy to replicate it in your eSpace.

Let us know how it goes!

Regards,

Paulo Tavares
Hi Paulo,

my fault, I forgot to say that Bindowns requests are only supported for http and, with that, it works fine for the three browsers.

In my espace it only works, as you said, with firefox. I will try to see what the problem is.

Thanks for the help
Best Regards,

Plácido Miranda