Determine current page in script

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Kaprice
Ebase User
Posts: 12
Joined: Sat Apr 04, 2015 3:43 pm
Contact:

Determine current page in script

#1

Postby Kaprice » Sat Jul 25, 2015 5:03 am

How can I determine what the current page is in a script.

Let's say I have a component on several different pages. And, I want to do something with that component when the page loads (such as hide or show).

Since each placed component has a unique prefix, I have to have a separate line for each one.

Rather than write separate scripts, It would be great if I could determine what the current page was and have a series of IF or SWITCH statements that could act on the appropriate component.

I've seen where I can reference a page or go to a page, but not where I can determine the current page.
0 x
Kap

User avatar
dvanhussel
Ebase User
Posts: 161
Joined: Fri Oct 19, 2007 12:45 pm
Location: Haarlem, the Netherlands

#2

Postby dvanhussel » Sat Jul 25, 2015 10:51 am

Hi,

Code: Select all

form.getCurrentPage();
returns a page-object containing the current page.

Regards,

David
0 x


Who is online

Users browsing this forum: No registered users and 8 guests