Expand my Community achievements bar.

SOLVED

How to delete curtain pages programmatically via JavaScripts

Avatar

Level 1

Hi there,  Is there a way though to hide the curtain page? I have this PDF that I created via LiveCycle forms and I need a button on page one to hide (or delete) page 2.  Is there anyway this can be done with some kind of code behind this command button such as FormCalc or JavaScript?  I tried something with this below but had no luc:  ----- CRF.#subform[0].Button1::click: - (JavaScript, client) ---------------------------------- //Hide page 2 Page2.presence = "hidden"   I would very much appreciate any help provided. Adnan

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Ok. I think the reason the PDF was not attaching is because it was almost 11mb. The reason for that is because of the image you were using on the top right hand side of page 1. This was actually a stock photo and was high resolution for print. This is obviously not a good idea cos the form cant be sent around. So I have deleted it. You can add it back if you need it there, but add a low res version. An image as small as it was does not need to be high res. I have added the code to your buttons. I think that is what you were after.

Dallas

View solution in original post

8 Replies

Avatar

Former Community Member

Hi Adnan. Yes, it is easy to hide pages. If you attach your form it's easier for us to have a look at what you're trying to do. Thanks.

Dallas

Avatar

Level 1

Hi Dallas,  I have attached the form. I alsowas going to ask how to have another code to add a blank page with one text fiend only?  Thanks for your help on this. Adnan

Avatar

Former Community Member

Hi Adnan, there seems to be something wrong with the PDF that you attached. I cant download it and you will notice the size is 0 bytes. There could have been an error during the upload process. Please can you reattach? Thanks.

Avatar

Level 1

Sorry... Here it is...

Thank you,

Adnan

Avatar

Former Community Member

Still no luck Adrian. I get this error when i try download your doc 'An general error occurred while processing your request.' Also, the size of a PDF should not be 0. Even a blank static PDF is like 10kb. Something is going wrong when you create the PDF and it is somehow being corrupted. I know this might seem obvious, but do you follow these steps:

1. Open the .xdp file and select File > Save As...

2. Then select 'Adobe Dynamic XML Form (*.pdf)' from the 'Save as type:' dropdown list.

3. Click the 'Choose File' button just below the Post in the Forum.

4. Only click 'Post Message' once the file has been attached.

Avatar

Correct answer by
Former Community Member

Ok. I think the reason the PDF was not attaching is because it was almost 11mb. The reason for that is because of the image you were using on the top right hand side of page 1. This was actually a stock photo and was high resolution for print. This is obviously not a good idea cos the form cant be sent around. So I have deleted it. You can add it back if you need it there, but add a low res version. An image as small as it was does not need to be high res. I have added the code to your buttons. I think that is what you were after.

Dallas

Avatar

Level 1

Dallas,

This is the answer I was looking for. Thanks for everything.

Best regards,

Adnan

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----