PDF-Forms is a service provided by PDFzone.com | http://www.pdfzone.com/
__________________________________________________________________

Hello,

I wonder if anyone can help.  I have a form with 2 fields which change
depending on what data the user enters - if the user enters 'G' in the
first field I would like the background colour of that field to change to
green and the score of 0 to appear in the second field, similarly if the
user enters 'R' in the first field the background colour should change to
red and the score of 6 to appear in the second field.  ( I also have two
others which are Y = yellow and a score of 4, B = blue and a score of 10).

I am fairly new to javascript and do not fully understand the if and else
statements, I have tried the following javascript in the mouse up action
tab of the first field and it works but obviously it is only a small part
of the code that I need.  Does anyone know how to do this.

var f = this.getField ("colour_lift");
var f2 = this.getField ("score_lift");

if
(f.value == "G");
{f.fillColor = color.green;
 f2.value = "0";

Any help is much appreciated.

Thank you

Michelle Jennings




***********************************************************************************
Interested in Occupational health and safety information?
Please visit the HSE website at the following address to
keep yourself up to date.

www.hse.gov.uk

***********************************************************************************


The original of this email was scanned for viruses by the Government Secure Intranet 
(GSi) virus scanning service supplied exclusively by Energis in partnership with 
MessageLabs.

On leaving the GSi this email was certified virus-free

To change your subscription:
http://www.pdfzone.com/discussions/lists-pdfforms.html

Reply via email to