Expand my Community achievements bar.

Notify user when a second page is generated


Former Community Member

Hi all,

I have a form with three tables. Users are able to make these tables appear and disappear on a click event. They are also able to add rows to these tables again on a click event.

Because of the two possibilities below, this form will at times spread to a second page.

The overseer of our forms development project would like to be able to notify the user when the page expands on to the second page.

Can anyone tell me how to generate a message box only in the event that a second page is generated?

Please keep in mind that I'm a newbie to both Livecycle and JavaScript.

Thanks in advance!

4 Replies


Former Community Member


Former Community Member


It did work, but for some reason it's firing twice? i.e. the message box appears twice when it should only appear once

I think it must be something to do with where I have the code? Below is where I have it.

form1.#pageSet[0].Page1.#subform[0]::calculate - (JavaScript, client)

Also, once it's fired it keeps firing with every button that is pressed.

In reality the form would only ever be a maximum of 2 pages but when I change the code to if(pCount = 2) the code fires as soon as the form opens and on every click after that.

Is there some tweaking that we can do with it?

Thanks for your help!

Much appreciated


Former Community Member

Hey, gwynp51907864,

You could use a global variable like boolMessageFired set to 0.  Check the value before entering the calculate event, if it is 0, enter the event then set it to 1 before exiting the event.  If it is 1, write code to exit the event so the code won't execute.  The next time you enter the event, the code should be bypassed and the message box will be suppressed. 


Former Community Member

Hi @christopherf63509669,

Thanks for your suggestion. I guess what I should have included in my first post is that I'm a novice at JavaScript. Could you explain how to use your suggestions, even if it's a snippet of code, so that I can try and adapt it for what I require?