Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Modify the footer with java-script

Avatar

Former Community Member
Hi,



Im' trying to modify the content of the footer in the master-page using java-script. So I put in the initialize event of the footer code to add "!" after a text field (with plenty of space left) but it doesn't do anything. The code is example.rawValue = example.rawValue + "!";

This code works fine in the rest of the document, but it doesn't seem to work in the master-page.

Could somebody tell me what I'm doing wrong?



Thanks in advance!



Gert
3 Replies

Avatar

Former Community Member
The access to the masterpage objects is not in the same scope as where the script is running so you must path to it starting from the root:



so.... form1.pageSet.Page1.example.rawValue = form1.pageSet.Page1.example.rawValue + "!";



where form1 is the root node of your form (look in the hierarchy view), pageSet indicates the objects in the Master Pages, Page1 is the 1st Page name in the Master Pages and exampel is the path to th erest of the object.



Make sense?

Avatar

Former Community Member
No,



It makes no difference. I had already from the beginning the suggestion rawValue after I put a dot after the namefield so the field is effectively known where I put the scripting!

Any other suggestions???



Gert

Avatar

Former Community Member
Can you post the form to livecycle8@gmail.com and I will have a look.