Notify user when a second page is generated

Avatar

Avatar
Validate 1
Level 1
gwynp51907864
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
gwynp51907864
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
gwynp51907864
Level 1

24-05-2015

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!

Accepted Solutions (0)

Answers (4)

Answers (4)

Avatar

Avatar
Validate 1
Level 1
gwynp51907864
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
gwynp51907864
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
gwynp51907864
Level 1

02-06-2015

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?

Thanks

Avatar

Avatar
Level 1
christopherf635
Level 1

Likes

0 likes

Total Posts

9 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
christopherf635
Level 1

Likes

0 likes

Total Posts

9 posts

Correct reply

0 solutions
View profile
christopherf635
Level 1

27-05-2015

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. 

Avatar

Avatar
Validate 1
Level 1
gwynp51907864
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
gwynp51907864
Level 1

Likes

0 likes

Total Posts

7 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
gwynp51907864
Level 1

26-05-2015

Thanks,

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

Avatar

26-05-2015