Does any one know what the syntax look like to have render option: modeless window, when using awareApp.startProcess from custom html.
I've spent about an hour searching the forum now cause I know it was here somewhere but for the life of me I cannot find it.
So basically I want to be able to do awareApp.startProcess('myProcess', modeless, margins: 0, center: true, scroll:true) or something like that.... Don't know what it should look like.
Thanks in advance!
Syntax for modeless window from JavaScript??
-
- Posts: 345
- Joined: Mon Nov 12, 2012 9:08 pm
- Location: South Africa
Syntax for modeless window from JavaScript??
Hein Hanekom & Werner Hanekom
Sinov8.net
AwareIM Version 5.9 | 6.0 | 7.0 | 7.1 (Windows EC2 R2012 & MySQL)
Sinov8.net
AwareIM Version 5.9 | 6.0 | 7.0 | 7.1 (Windows EC2 R2012 & MySQL)
Re: Syntax for modeless window from JavaScript??
Hi all.
I'm looking for this now.. Anyone know where it is?
I'm looking for this now.. Anyone know where it is?
-
- Posts: 197
- Joined: Fri Jun 17, 2016 7:10 am
- Location: Brisbane Australia
- Contact:
Re: Syntax for modeless window from JavaScript??
This works for AwareApp.startProcess2
Code: Select all
AwareApp.startProcess2('myProcessName', 'myObjectName', 'myObjectID', {modeless: true, position: {top: 100, right: 100 } } );
AWS Linux, Windows Server, AIM 8.4 & 8.6
Re: Syntax for modeless window from JavaScript??
Awesome, thanks! This is what I was looking for:
{modeless: true, position: {top: 100, right: 100 } }
{modeless: true, position: {top: 100, right: 100 } }
Re: Syntax for modeless window from JavaScript??
Hi All.
Does anyone know if there is a way to use this in a custom query template? I want a button to open a modal window, but using this syntax gives me an error "modeless: true, position: {top: 100} is not a valid attribute name" or whatever the message is when you put something that isn't an attribute name in { } brackets..
Thanks in advance..
Does anyone know if there is a way to use this in a custom query template? I want a button to open a modal window, but using this syntax gives me an error "modeless: true, position: {top: 100} is not a valid attribute name" or whatever the message is when you put something that isn't an attribute name in { } brackets..
Thanks in advance..
-
- Posts: 197
- Joined: Fri Jun 17, 2016 7:10 am
- Location: Brisbane Australia
- Contact:
Re: Syntax for modeless window from JavaScript??
Create an AwareIM Process that calls EXEC_SCRIPT (example below calls javascript function AwareApp.startProcess2 passing the ID of an object in Context)
Then add an Operation (button) to your Query that calls that AwareIM Process.
Code: Select all
EXEC_SCRIPT 'AwareApp.startProcess2(`Person_View`,`Person`,'+AS_STRING(Person.ID)+',{modeless: true, position: {top: 100, right: 100 }}); '
AWS Linux, Windows Server, AIM 8.4 & 8.6
Re: Syntax for modeless window from JavaScript??
I would never have thought of that, thanks! I will let you know if I run into any trouble.
+1000 if it works
One more thing, since this is a day of issue resolution, I presume modeless window isn't possible for ENTER NEW actions?
+1000 if it works
One more thing, since this is a day of issue resolution, I presume modeless window isn't possible for ENTER NEW actions?
Re: Syntax for modeless window from JavaScript??
This doesn't work for me.. Perhaps I'm doing something wrong? I did pretty much exactly what you said, just changing Person_View to my process name, and Person to my object name. I get a regular popup, not a modal window..UnionSystems wrote:Create an AwareIM Process that calls EXEC_SCRIPT (example below calls javascript function AwareApp.startProcess2 passing the ID of an object in Context)Then add an Operation (button) to your Query that calls that AwareIM Process.Code: Select all
EXEC_SCRIPT 'AwareApp.startProcess2(`Person_View`,`Person`,'+AS_STRING(Person.ID)+',{modeless: true, position: {top: 100, right: 100 }}); '
To confirm, I have a process saying "EDIT Object USING form_name" - this process has Object as an input.
I have a second process saying "EXEC_SCRIPT `AwareApp.startProcess2('Process_name','Object',`+AS_STRING(Object.ID)+`,{modeless:true,position:{top:60}}`" - also with Object as an input.
On my custom query I have a button that calls the second process, using:
<button class="..." onclick="AwareApp.startProcess2('second_process_name','Object',{ID},'main');">button_text</button>
Anything I'm missing?
Re: Syntax for modeless window from JavaScript??
Ok, so it seems I got something to work.. Not quite how I want but it will do for now.
I've now used html codes for { and }. These are { = { and } = } . I can then use the modal output syntax directly from my custom query. Here's what it looks like:
I also needed to change my process from EDIT to VIEW. Not sure if this is why what @UnionSystems suggested wasn't working, but probably (I got a popup with the html codes and EDIT, as I did with the EXEC_SCRIPT solution.. so this quite probably was the issue).
For me using { and } seems like a bit less work than having an EXEC_SCRIPT process for this purpose.
Thought I'd post in case anyone else ends up here..
Thanks for the reply, @UnionSystems, and thanks to everyone who took the time to read this without replying too.
I've now used html codes for { and }. These are { = { and } = } . I can then use the modal output syntax directly from my custom query. Here's what it looks like:
Code: Select all
AwareApp.startProcess2('Process_name','Object',{ID},{modeless:true,position:{top:60}});"
For me using { and } seems like a bit less work than having an EXEC_SCRIPT process for this purpose.
Thought I'd post in case anyone else ends up here..
Thanks for the reply, @UnionSystems, and thanks to everyone who took the time to read this without replying too.