cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Form - Cannot add Javasript codes on Master Pages

Former Member
0 Kudos

Hi Experts - please help

Could someone please tell me Why (or How) JavaScript cannot be plave on a Master Page - I have some Javascript codes here working fine on a subform page - but when I try to put them on a Master page page - the JavaScript editor is greyed out - unenable me to put the codes in - If I put the codes in the subform in the Master page - nothing work - ??

Should I use xfa.layout...for the resolveNodes ???

Thanks in advance

Points rewarded for replies

Accepted Solutions (0)

Answers (1)

Answers (1)

harman_shahi
Contributor
0 Kudos

Hello,

Not sure what the problem could be, but here are few hints:

1) We have placed JavaScript code in the Master pages before, and it worked fine.

2) We are using Adobe LiveCycle Designer Version 7.1.

3) Remember, you can't put JavaScript code for the ContentArea of the Masterpage, So try adding a blank subform, and place some test code (xfa.host.Messagebox....) in the following event: layout:ready

Is it a Print form?

hope this helps,

Harman

Former Member
0 Kudos

Hi,

You can add script code to the Master page if at least one field is on the master page. You cannot add script code to the content area object of master pages

Regards,

Juergen

Former Member
0 Kudos

Hi Harman

Thanks for your reply

My design is a print form.. I guess I cannot use xfa.host ..Right?..

Is there away to send a message to a screen for Print form (...handy to see field value to debug field)

Thanks

Former Member
0 Kudos

messageBoxes do work in printing forms, but you need to place a object on the master page and do some specific coding in the time events to show them.

Buttons and other interactive things won't work in a print form.