Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Javascript popup
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Javascript popup

 Post Reply Post Reply Page  12>
Author
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4111
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Topic: Javascript popup
    Posted: 31 Jul 2015 at 3:08pm
You should explain how you want all the possible outcomes to processed.
You appear to be missing one more possible outcome.
Back to Top
Maureen View Drop Down
New Member
New Member


Joined: 09 Jun 2015
Location: Netherlands
Points: 24
Post Options Post Options   Quote Maureen Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 9:11pm
You're right. It works again, was bussy doing 2 different things and mix them. Shouldn't do that.

But thanks again. Hope the people for who I'm doing this are pleased with the form
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 8:41pm
I did understand... If Field1>Field2 then the result is positive (bigger than zero), no?
And if it's smaller then the result is negative (smaller than zero), etc.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
Maureen View Drop Down
New Member
New Member


Joined: 09 Jun 2015
Location: Netherlands
Points: 24
Post Options Post Options   Quote Maureen Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 8:32pm
I know that there're 3 caparisons, but how to use it in a script I don't know
If the fields are equal the color is black
Back to Top
Maureen View Drop Down
New Member
New Member


Joined: 09 Jun 2015
Location: Netherlands
Points: 24
Post Options Post Options   Quote Maureen Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 8:30pm
I think didn't explain it right. The color of the text in field3, depends on the outcome of Field1-Field2
In field3 is a formula field1-field2
Example 1  Field1=25, Field2=20. In Field3=5 ; the text color should be blue, because Field1>Field2

Example 2  Field1=20, Field2=25. In Field3=-5 ; the text color should be red, because Field1<Field2

If field1 is equal to field2 then the color is black

Hope this make more sence
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 8:13pm
You can use this as the custom validation script:

if (event.value>0) event.target.textColor = color.blue;
else if (event.value<0) event.target.textColor = color.red;
else event.target.textColor = color.black;
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
gkaiseril View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Location: USA
Points: 4111
Post Options Post Options   Quote gkaiseril Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 8:05pm
I believe there are 3 simple caparisons possible, less then, equal to , and greater than.
 
What should happen if the fields are equal?
 
 
Back to Top
Maureen View Drop Down
New Member
New Member


Joined: 09 Jun 2015
Location: Netherlands
Points: 24
Post Options Post Options   Quote Maureen Quote  Post ReplyReply Direct Link To This Post Posted: 30 Jul 2015 at 6:47pm
Oeps Sorry. This also works. Thank you

Can I ask 1 more thing. Hope this is the last one

For example: Field1=100, Field2= 300, In field3 I have a calulation Field1-Field2. I need a script in Field3 that change the text. If Field1>field2 the text color change in blue and if Field1<Field2 the color must be red.

Hope you can help again



Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 2015 at 8:39pm
I told you already, use the On Blur event.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
Maureen View Drop Down
New Member
New Member


Joined: 09 Jun 2015
Location: Netherlands
Points: 24
Post Options Post Options   Quote Maureen Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 2015 at 8:07pm
I'm sorry. I did it now, but I don't know what trigger to use. I want that the popup appears at the moment the user has filled in a value and click in another field
Back to Top
try67 View Drop Down
Senior Member
Senior Member


Joined: 15 Jul 2011
Points: 634
Post Options Post Options   Quote try67 Quote  Post ReplyReply Direct Link To This Post Posted: 29 Jul 2015 at 6:27pm
You didn't follow the instructions I've provided above. This is not a calculation script.
- Acrobat Expert - Contact me personally at try6767@gmail.com
Check out my custom-made scripts website: http://try67.blogspot.com
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.047 seconds.