Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Need help with links and fill color

Avatar

Former Community Member

Hi all, I just recently discovered liveCycle and am very impressed with it! I have been trying to make myself a homework calendar for a while now, and I have it done mostly, but there are a few more things I'd like to add that I don't know how to do.

I have some HTML and Java experience, but very little XML or JavaScript experience. I have a feeling that what I am trying to do is relatively simple, but I just can't figure it out! I have spent hours pouring over Google and the help files, and I feel like I have gotten close, but no joy yet.

I have attached my calendar so far (truncated to fit 5MB max attachment size). I'd like it to do two more things:

1. Have the background color of the table cells change from white to green when the check box is checked.

(Alternately, I'd really like to get rid of the check boxes all thogether and just have the background of the table cells turn green with a keyboard shortcut, like "ctrl + D" for 'done'. But if that isn't possible, then the color change with the check box is fine.)

2. I'd like the button called 'WORD DOC' in the upper right of the form to open a word document on my local computer. Where I just push that button and a work doc opens right up in Word in another window.

I was able to get .PDF documents to open up with those other two buttons there ('Big Java' and 'Beginning Java II') by adding the script

app.openDoc("Big Java.pdf");

and

app.openDoc("Beginning Java II.pdf");

to each of the buttons respectively, but those PDFs need to be in the same folder as the calendar for that to work. I tried just altering that script by replacing the name of the PDF file with the name of a Word doc file like this:

app.openDoc("test.docx");

but the button doesn’t work at all, it just does nothing.

So that’s what I am trying to do. I have spent hours messing around with anything I could think of to get this to work, but unfortunately I just don’t know the language well enough to get it to work.

I would really appreciate any advice on this at all. Thank you very much for your consideration.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Click the second check box and see the result.

Is this what you want?

Nith

View solution in original post

4 Replies

Avatar

Level 10

To change the background color:

cellName.border.fill.color.value = "0,255,0";     // rgb model

Nith

Avatar

Former Community Member

Hi,

Thanks very much for your response! I was able to use the code to make the box turn green by adding that script to the 'click' event of textbox and changing the language from FormCalc to JavaScript. So what happened was that when I clicked in the textbox, the color turned green.

I couln't firgure out how to add it to the checkbox though. When I tried, it didn't do anything. The problem now is that when I click in the textbox to add my homework, it turns green. I need it to turn green once I finish my homework.

This would work great if the texbox turned green when I SHIFT clicked the box. Is there anything I could add to that scipt to do that?

Avatar

Correct answer by
Level 10

Click the second check box and see the result.

Is this what you want?

Nith

Avatar

Former Community Member

You rock! That's exactly what I wanted! Thank you very much for your help :-)