PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WEBDEV 2024 → Wlanguage equivalent of Javascript code
Wlanguage equivalent of Javascript code
Iniciado por Gautam, nov., 15 2020 10:08 AM - 1 resposta
Membro registado
67 mensagems
Publicado em novembro, 15 2020 - 10:08 AM
Hi All

I am trying out a Javascript component from Stimulsoft (www.stimulsoft.com) to allow dynamic creation of reports in Webdev.

As per the supporting documentation for the component I have created the following Javascript function and call this function from the onLoad event of the browser in WL. This function works well.

function startReportDesigner()
{
var designer = new Stimulsoft.Designer.StiDesigner(null,"StiDesigner",false);
designer.renderHtml("A2"); //A2 is the alias for Cell_Report control defined on the page in which the designer is rendered
}

The above function is called from onLoad event of the page (WL) using the following command:
startReportDesigner()

All the relevant dependency files .css and .js files have been loaded on the page and the above function works well.

However, I would like to REWRITE the above using WLanguage code with something like below in the onLoad section of the page

designer is object dynamic
designer = new "Stimulsoft.Designer.StiDesigner(null,'StiDesigner',false)"
designer.renderHTML(Cell_Report..Alias)

The above code fails to execute with a "Stimulsoft.Designer.StiDesigner(null,'StiDesigner',false)" element not found error message.

Can anyone help me understand how I should define the above in the correct manner so the "designer" variable can be accessed as an object in WLanguage code?

I want to be able to access the designer variable defined in the javascript function from many other places and therefore want to declare this as a WLanguage object.


Many thanks and regards
Publicado em dezembro, 29 2020 - 8:14 PM
hELLO

Make a wlanguadge browser procedure . In that procedure call the javascript function.That should do the job.You can call the wlanguage function everywhere you want