The 1C:Enterprise developers forum
Hi everyone,I'm creating an button in HTML by using JS and I want to assign this button with the event open a form. How can I do it? Thank you in advance! Duc Tien NGUYEN
Hi, Duc Tien NGUYEN, Where you generate this html view? In platform form, in email, web site or other?For example if you use mailing and using web publishing you can generate links likehttps://domain/infobase/#e1cib/data/Metadata.ElementName?ref=object_idfor example:https://domain/infobase/#e1cib/data/Catalog.Catalog1?ref=80fe00155d00050d11eaaa40c06233d0Path to object you can get by function "GetURL".
Hi, Bogdan Zuy,
Duc Tien NGUYEN, ok, so I think you use "HTML document field" and you can use OnClick event. For example,
<ht ml><body><button id=test>Open form</button></body></html>
If(EventData.Button.id = "test") Then OpenForm("Catalog.Catalog1.ObjectForm"); EndIf;
Bogdan Zuy, Thank you so much. It works perfectly.
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.
Get our brochures now! They are packed with all the info you need on 1C:Enterprise, a comprehensive technological platform with a wide range of built-in and separate tools and services and a system of off-the-shelf solutions powered by this platform. Plus, data on customer projects, including stats on their size and the effect of automation. Just leave your email address to download!
We're committed to your privacy. 1С uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy
Your request has been successfully sent.