7 Replies - 726 Views - Last Post: 26 August 2013 - 10:29 AM Rate Topic: -----

#1 dioogo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-August 13

Question, How to change font color of one "selected" task.

Posted 23 August 2013 - 04:54 AM

Hi guys,

I'm new at phpmaker. So this is my question, I have one table named "Asks" this table have one field called "Status" the field "Status" is one "Select" that have some options when clicked. So when I click on "Status", some options appear to me, like "Open, Closed, Confirmation..." I need to known how do I change the color of those options. Like "When the value is "OPEN", then the color is red".


Someone told me to create one JS Function and put it on [custom atributes]. Could you guys help me with this JS Function?. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Question, How to change font color of one "selected" task.

#2 JMRKER  Icon User is offline

  • D.I.C Addict

Reputation: 128
  • View blog
  • Posts: 828
  • Joined: 25-October 08

Re: Question, How to change font color of one "selected" task.

Posted 23 August 2013 - 08:27 PM

At least show the HTML and CSS (if available) you have developed so far.
Was This Post Helpful? 0
  • +
  • -

#3 dioogo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-August 13

Re: Question, How to change font color of one "selected" task.

Posted 24 August 2013 - 04:01 AM

View PostJMRKER, on 23 August 2013 - 08:27 PM, said:

At least show the HTML and CSS (if available) you have developed so far.



I did all site in PHP MAKER and my database on mysql. This is my PHP MAKER project. I hope this help.
Was This Post Helpful? 0
  • +
  • -

#4 JMRKER  Icon User is offline

  • D.I.C Addict

Reputation: 128
  • View blog
  • Posts: 828
  • Joined: 25-October 08

Re: Question, How to change font color of one "selected" task.

Posted 24 August 2013 - 06:17 AM

View Postdioogo, on 24 August 2013 - 05:01 AM, said:

I did all site in PHP MAKER and my database on mysql. This is my PHP MAKER project. I hope this help.


Then you might want to ask your question on the PHP forum as this is the JS forum.
HTML, CSS and JS all complement each other so leaving out 2/3 of the problem won't help much with your problem.

This post has been edited by andrewsw: 24 August 2013 - 06:31 AM

Was This Post Helpful? 0
  • +
  • -

#5 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3473
  • View blog
  • Posts: 11,785
  • Joined: 12-December 12

Re: Question, How to change font color of one "selected" task.

Posted 24 August 2013 - 06:30 AM

I've moved this to the PHP forum to see if you get more of a response.

However, I don't know if many here use PHP Maker and you might post a question on their forum (if they have one). Unless you can find, and post, some code where you will insert your Javascript (or PHP that creates JS) then this may be your best option.
Was This Post Helpful? 0
  • +
  • -

#6 dioogo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 23-August 13

Re: Question, How to change font color of one "selected" task.

Posted 26 August 2013 - 07:58 AM

View Postandrewsw, on 24 August 2013 - 06:30 AM, said:

I've moved this to the PHP forum to see if you get more of a response.

However, I don't know if many here use PHP Maker and you might post a question on their forum (if they have one). Unless you can find, and post, some code where you will insert your Javascript (or PHP that creates JS) then this may be your best option.


So I found the function that show me the "STATUS" values.

// status
			if (strval($this->status->CurrentValue) <> "") {
				switch ($this->status->CurrentValue) {
					case $this->status->FldTagValue(1):
						$this->status->ViewValue = $this->status->FldTagCaption(1) <> "" ? $this->status->FldTagCaption(1) : $this->status->CurrentValue;
						break;
					case $this->status->FldTagValue(2):
						$this->status->ViewValue = $this->status->FldTagCaption(2) <> "" ? $this->status->FldTagCaption(2) : $this->status->CurrentValue;
						break;
					case $this->status->FldTagValue(3):
						$this->status->ViewValue = $this->status->FldTagCaption(3) <> "" ? $this->status->FldTagCaption(3) : $this->status->CurrentValue;
						break;
					case $this->status->FldTagValue(4):
						$this->status->ViewValue = $this->status->FldTagCaption(4) <> "" ? $this->status->FldTagCaption(4) : $this->status->CurrentValue;
						break;
					case $this->status->FldTagValue(5):
						$this->status->ViewValue = $this->status->FldTagCaption(5) <> "" ? $this->status->FldTagCaption(5) : $this->status->CurrentValue;
						break;
					default:
						$this->status->ViewValue = $this->status->CurrentValue;
				}
			} else {
				$this->status->ViewValue = NULL;
			}
			$this->status->ViewCustomAttributes = "";


There's any way to add the function to change color? like in "FldTagCaption(1)" where "1" = One Status and "FldTagCaption(2)" another status... Can anyone help me with this? Thanks.

This post has been edited by andrewsw: 26 August 2013 - 08:00 AM
Reason for edit:: fixed code tags

Was This Post Helpful? 0
  • +
  • -

#7 CTphpnwb  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2984
  • Posts: 10,320
  • Joined: 08-August 08

Re: Question, How to change font color of one "selected" task.

Posted 26 August 2013 - 10:22 AM

This is the problem with attempts to automate code generation: you still need to know how to write code and you need to learn the code generator. I don't know PHP Maker and until some one pays me to learn it, I won't. I suggest you ask your question on their forum:
http://download.hkvs...ewforum.php?f=4
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil  Icon User is online

  • Toubabo Koomi
  • member icon

Reputation: 5309
  • View blog
  • Posts: 27,210
  • Joined: 10-May 07

Re: Question, How to change font color of one "selected" task.

Posted 26 August 2013 - 10:29 AM

If there was a way to get the numerical value out of $this->status->FldTagValue(1):, I would just skip the case statement & do something like :

$this->status->ViewValue = $this->status->FldTagCaption($i) <> "" ? $this->status->FldTagCaption($i) : $this->status->CurrentValue;


Once, & done.

The problem is that if you don't know the language, it's difficult for us to make a suggestion as this is automated code to fit a specific situation. The most likely outcome is you'll copy & paste a suggested solution & something will break. Then you'll ask how to fix it, again not really understanding what is being suggested. Basically you wind up using us to fix code that we didn't write, & that you don't understand.

No one walks away happy.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1