Program Progress

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
ozrodz
New User
Posts: 5
Joined: Wed Mar 28, 2012 11:58 am
First Name: Oz
Last Name: Rodz
Company Name: ECTS
Contact:

Program Progress

Post by ozrodz »

Is there a way that every time the json data is loaded from the backend displaying a format, is there a way to automatically simulate a button click.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Program Progress

Post by David »

PUI does provide screen-level and global "load" events that can be used to call code on screen render, see here:

http://www.profoundlogic.com/docs/displ ... load+event

And here:

http://www.profoundlogic.com/docs/displ ... pui.onload

Also, an API is provided to simulate button clicks, see here:

http://www.profoundlogic.com/docs/displ ... %28+id+%29
ozrodz
New User
Posts: 5
Joined: Wed Mar 28, 2012 11:58 am
First Name: Oz
Last Name: Rodz
Company Name: ECTS
Contact:

Re: Program Progress

Post by ozrodz »

David
Thanks for your reply.

I reviewed the links you provided in reference to the pui.onload, but the example from the link is very basic.

Not sure if you could provide an example of how to implement the pui.onload event when a format is displayed on the browser.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Program Progress

Post by David »

Are you using Genie? Or not? I'm asking because the process is slightly different if you are running outside of Genie.

Let me know and I can explain how to implement the function.
ozrodz
New User
Posts: 5
Joined: Wed Mar 28, 2012 11:58 am
First Name: Oz
Last Name: Rodz
Company Name: ECTS
Contact:

Re: Program Progress

Post by ozrodz »

No not using genie.
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Program Progress

Post by David »

Profound UI includes a facility for automatically loading JavaScript files onto the page. You can create a JavaScript file and place directory /www/profoundui/htdocs/profoundui/userdata/custom, or any sub-directory. You can create sub-directories if you want.

Profound UI will read through /custom and link any JS or CSS files onto the page.

You can implement the function in your file like this:

Code: Select all


pui.onload = function() {

}

PUI will call the function automatically each time a record format is rendered. Is this what you were looking for?
ozrodz
New User
Posts: 5
Joined: Wed Mar 28, 2012 11:58 am
First Name: Oz
Last Name: Rodz
Company Name: ECTS
Contact:

Re: Program Progress

Post by ozrodz »

that's pretty much what I was looking for. Is there a way to get the Id of a particular format.

For example if I have a program that has the following formats
fmt1
fmt2
fmt3

Is there a way to determine when fmt2 is loaded
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Program Progress

Post by David »

Yes, the function can accept a parameter which has all this information, see here:

http://www.profoundlogic.com/docs/displ ... pui.onload

So, you could code it like this:

Code: Select all


pui.onload = function(info) {

  if (into.name == "FMT2") {

    // Do something.

  }

}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest