PDA

View Full Version : How to use a javascript function for showdialog in a VFP application



hmischel@diligentsystems.com
2017-08-10, 17:49
Hi,

I thought this would be pretty simple, but I am missing something.

I created a file called javascriptfuntions.js.

In that file, I copied the example from the road map.


function page1_myDialog()
var cont = createObject("myContainer", "container");
cont.backcolor = "white";
cont.addObject("myTextBox", "textbox");
return cont;

In the console - I tried to loadlibrary('javascriptfunctions.js') - but it threw a parse error.

So I added the curly brackets around the javascript function as you would normally do, but still no luck.

Is there a different way I should be doing this?

Thanks

Herb

yvonne.milne
2017-08-15, 10:38
Hi Herb,

Yes, it should have the curly brackets - I have corrected the example in the roadmap.

Using a JavaScript generated container in a Lianja.showDialog() or Lianja.showDialogPanel() is supported in the web client. Your post title mentions VFP - is this for a desktop App? Can you give more details on what you want to achieve?

Regards,

Yvonne

hmischel@diligentsystems.com
2017-08-15, 21:50
Hi Yvonne,
I was trying to do this in a vfp desktop app.
Of course I can just add a regular vfp page, but thought I could use a JavaScript function.
If that's not supported this way, that's not a problem.

Thanks

Herb