Using HTML in 1C

Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Aug 28, 2015
Company:

Hello everyone!
Need some help with my mobile application.
On the managed form there is a html field. On event OnOpen I load my html page with javascript functions.
AttachIdleHandler calls procedure  wich  connects to the webservice and sends received parameter to javascript function. It works fine on my computer but when I launch the application on a smartphone some errors come out. I send the parameters to javascript function using the following code

Code
Items.HTMLPage.Document.parentWindow.eval("Increase ('" + Message+"')");

Is there any other way to send the parameter to javascript function from 1C?

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Samir Muqimov!

Try to do following:
In JavaScript:

Code
function setTextsFunction(...){
    ...
}
document.SetTexts = setTextsFunction;

In 1C Script:
Code
Items.Editor.Document.SetTexts(...);

 
#3
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Aug 28, 2015
Company:

Hello Timofey! Thanks for your quick reply.But the problem is still actual.
The same error appears on a smartphone:

Object field not found (Document)

I guess it appears because html document is a comobject and as far as I know mobile platform has some problems with these kind of objects. Any ideas about this error?

 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Samir Muqimov.

As for now, this feature is not supported. I have added your case to the feature request.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.