Colour display in a LOV
Hello all
I trying to create a LOV for colours to enable the end user to select a colour and not just a colour code
Using information on Patrick Wolf web site ...http://www.inside-oracle-apex.com/2007/08/add-colors-or-images-to-your-select.html ... I am almost there
So far ...
1) created a table with colour codes ... colour_number (ff8080, ff80ff, etc)
2) Created a LOV select
select COLOUR_NUMBER display_value, COLOUR_NUMBER return_value
from COLOUR
order by 1
this gives a list of the colour codes
3) Created a Post Element Text (field name is P2_HEADER_COLOUR)
<script type="text/javascript">
$x("P2_HEADER_COLOUR").style.backgroundColor = '("P2_HEADER_COLOUR")';
</script>
This does not work as above ... I have a systax error in?
= '("P2_HEADER_COLOUR")'
(If I used = 'ff8080' it works ... but the LOV is all one colour!)
If it is only a systex error? ... please could someone help me with the "error of my ways"
If anyone knows better away of doing LOV showing a list of colours (as colours not numbers) in would be great to know?
Thanks for looking
Pete
Hello,
>> can you see away of coding this without "hardcoding" the colour codes into the javascript?
I’m using the following function to achieve what you are asking for:
/* Color the options of a select list */
function colorSelectList(pId) {
var obj = $x(pId);
var elm = obj.getElementsByTagName('OPTION');
for (i=0; i<elm.length; i++) {
elm.style.color = elm[i].value;
pId is the name of your select list item. The function assumes that the returned value of your LOV is a legitimate color code (as I believe is the case in your example). I’m running the function using an onload event, but I don’t see any reason why it should not run in the region’s footer of your form.
Of course, you can use any other legitimate value for the style attribute, e.g. backgroundColor.
Regards,
Arie.
Similar Messages
-
up to now I had no problem when editing photos with photoshop elements 9. Due to an unknown reason/event the colours displayed , now, are not correct : it looks like the gama adjustment has been changed and the photo rendition is uncorrect. If I display the same photos with other photo editing software ( DPP from Canon for example, or Xnview) , the colours are correct !!... Can you help me ?
Thanks a lot !
JJ EtienneThank you for trying to help me. In fact, I resolved my problem by changing the default ICC profile for my screen : I entered the parameters settings panel, screen definition and then advanced settings where I could choose another ICC profile.
Thank you anway !!
JJ -
Im getting an ipod with a colour display i just wanted to know how often do people have issues with it because i had a mini and i had terrible battery problems. does the ipod 20gb have any known battery problems?
James,
normally none of the iPods have battery issues. But I have heard of a very funny story: if the alarm is set by accidence, the default time is 2400 hours, midnight! Most of the people do other things rather than listening to music on the iPod at that time. So the next day when they take it, it is running and the battery is empty (no wonder!). So sometimes this can be the cause for very short battery life...:-)))
Best
Roman -
IPod with colour display loop in restart mode unable to stop
During a synchronisation of mi 60 GB iPod colour display sync. stopped and iTunes did not work at all until i disconeted the iPod (With the display frozen as it was synchronising). I tried the select-menu stuff and the restart seemed to start. But it was only to enter in an aparent loop where the apple sign apears first, then the display backlight opens and then everything shuts down and retarts...until the battery is empty.
Trying to connect the iPod to the Mac did not solve anything, the iPod did not apear neither in the finder or in iTunes.
Any idea before going to Apple services?could be reaching a time for a battery replacement, but have a try to put it in disk mode, do a Restore then have a charge for few hours
Try to put the iPod into Disk Mode if it fails to appear on the desktop
http://docs.info.apple.com/article.html?artnum=93651 -
IPod with colour display frozen in 'hold' mode
My iPod with colour display has frozen whilst in 'hold' mode. Toggling 'hold' does not unlock 'hold'. Screen remains frozen despite following reset steps and searching he forums. Anyone got any suggestions or links for me to check out please ?
Thanks, JeffThe reason I asked about podcasts is that I experienced that problem for much of a year and it was finally fixed with one of the recent updates to iPod and/or iTunes. I also found that Reset may take 10 or more attempts. I know it's a pain, but, just keep trying for a long time. Another thing that may work is to just leave it sit for a day or so until the battery goes fully discharged, then do the Restore.
-
Why don't colours display correctly in the viewer
why don't colours display correctly in the viewer
What are you seeing? Post a screenshot?
What computer is this? -
Colourful display causes problems
Dear Sir/Madam
The colourful display by Firefox browser on my phone causes me confusion. I want simple white background, please help me.
Thanking you.Hi!
Could you please explain the problem in greater detail? Are you having issues with the background colour on the websites you visit, or are these bright colours in the Firefox address bar (at the top of the screen)?
Thanks,
Jayelbe -
Null values not displaying in the LOV on the parameter form.
My report works perfect while in Oracle Reports 10g, however when I move it to our menu (Oracle Forms 10g) it does not display the null in the LOV on the parameter form.
This report allows the the user to select by inspector or district or everyone for certain dates.
Ex: I have 4 parameter fields. The user must enter the start & end dates and either the Inspector or the district or leave the inspector or district null to run for everyone.
The district LOV is :
select dnr_section_code, description from dnr_section_code where dnr_section_code in ('29', '38','52')
UNION
select null, 'All' from dual
order by 2 asc ;
The inspector LOV is:
select null , 'All' from dual
UNION
select person_seq, first_name||' '||last_name inspector from vw_eng_inspectors
order by 2 asc
In my Data Model query I use the :
My select
from tables
where clause
+
----by inspector
and (prod_fac_inspections.person_seq_inspector =
nvl(:inspector,prod_fac_inspections.person_seq_inspector))
---by district
and
(d.dnr_section_code = nvl(:district,d.dnr_section_code)
and d.person_seq = prod_fac_inspections.person_seq_inspector)
Again, it works perfect in Reports! It eliminates having 3 reports on the menu. This one report gives the user the option of selecting dynamic parameters.
Also, I got so frustrated, that I went a different route of using a default where.
I am stuck with the error of ORA:00933 SQL command not ended properly
1=1
I set the initial value to 1=1 and it does not like it.
I am stuck!
DB = Oracle Database 10g Enterprise Edition Release 10.2.0.2.0Hi Krishna,
I'm not sure I understand the probelm.
A progress bar control only displays numeric values. When do you mean by "unassigned values"? What would you expect to be presented?
Best regards,
Udi -
Formatting display value in LOV
I have an LOV whose display value is a concatenation of 2 database fields. That works fine. But I want to put a tab in between the
2 fields, otherwise the values are displayed one right after the other, and the columns are out of alignment from one row to the next.
In sqlplus, I can do:
select CHR(9)||to_char(objecttype_id)||CHR(9)||objecttype_name from hdb_objecttype;
And I get:
12 acoustic velocity meter
1 basin
11 canal
2 climate site
3 confluence
4 diversion
10 hydro plant unit
5 hydro power plant
6 reach
7 reservoir
14 riverware dataobject
When I do the same thing in my LOV query, I get
12 acoustic velocity meter
1 basin
11 canal
2 climate site
3 confluence
4 diversion
10 hydro plant unit
5 hydro power plant
6 reach
7 reservoir
14 riverware dataobject
I've tried lpad and rpad, also. With blanks as padding they produce the above results. If I use a character such as '.' they behave
correctly, but I still don't have standard field widths because of the variance in character sizes.
Why won't any of this formatting work, and how can I get it to?
Thanks,
CarolHi, Carol,
In addition to what Max said, you may be displaying this in a region where whitespace is compressed; in which case you would need to use non-breaking spaces in place of regular spaces:
SELECT REPLACE ( RPAD ( TO_CHAR (objecttype_id)
, 10
) || objecttype_name
, CHR (38) || 'nbsp;' -- CHR (38) is ampersand
...Speaking of compressing whitespace, this site does it.
So when you say
CarolM2 wrote:
In sqlplus, I can do:
select CHR(9)||to_char(objecttype_id)||CHR(9)||objecttype_name from hdb_objecttype;
And I get:
12 acoustic velocity meter
1 basin
11 canal
2 climate site
3 confluence
4 diversion
10 hydro plant unit
5 hydro power plant
6 reach
7 reservoir
14 riverware dataobject
When I do the same thing in my LOV query, I get
12 acoustic velocity meter
1 basin
11 canal
2 climate site
3 confluence
4 diversion
10 hydro plant unit
5 hydro power plant
6 reach
7 reservoir
14 riverware dataobjectThey come out looking identical.
When you post formatted text (such as the results above) on this site, type these 6 characters:
(small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing. -
How to make the text differently colour displayed in a message box
I would like to display colour text
in a message box for each message on each line of message (carriage return).just trying to help
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
color_box_constant.jpg 51 KB -
Problem Displaying Value of LOV
I have a drop down on one of my edit screens that gives a list of Regions. On the screen the user can select the correct value and click Apply Changes and the database gets updated. The problem is that if I click to edit that record again it shows thate field as NULL. It will not display the value.
The data is correct in the database but I cannot see it on the edit screen. I have APEX 3.2It's a pretty straight forward sql and the list of values does appear when creating the item.... but I have a read only condition on this field so it is read only once the record has been created as the user is not allowed to change the value on update. I just tried changing the Read Only "display item normally" and now it works. So looks like the issue is trying to make the field display/read only once the value is set.
one solution that comes to my mind is to have two fields on the page... the POP LOV display only when the P5_LE_LOC_ID is null, then have a read only text field that displays when P5_LE_LOC_ID is not null... but seems silly to have to do this
select facility || ' ' || fac_desc d, facility r
from XXC.XXC_GL_DIV_REG_FAC
where nvl(LOCATION_INACTIVE_DATE,to_date('01/01/1901','mm/dd/yyyy')) = to_date('01/01/1901','mm/dd/yyyy')
and fac_desc not like 'CLSD%'
and fac_desc not like 'CNXL%'
and fac_desc not like 'ACQ%'
and fac_desc not like 'HOLD%'
and fac_desc not like '%Remote'
order by 1
Edited by: Kristina on Jun 11, 2010 1:10 PM -
Nokia N8 Amoled Colour Display Problem
Hello you all!
I have a problem with my display and i need you. In this post i will give you some test images and my samples so you will see what i mean!
I have problem with dark colour, if it is dark it is ok, and then if it is less dark then it appears violet. That is really anoying when watching movies when the movie is dark it is all violet and wierd colours. Example when you watch tron trailer whitc is uploaded on telephone and the colours are like it were be in 16bit colour (like in windows)
And another thing. When i start QTorch app in deafult menu of the app it is not dark it is violet around the qtorch logo and ON button! It souppouse to be black around those logo and on button!
Sorry for my bad english and the pictures are not brilliant quality but it show the point!
If yo will please tell me if you have same problem.
I went to Nokia Care Center and they tell me that this is normal, but for me it is not normal, because n8 is a flagship of nokia and they are not allowed to do such a mistake. I am really disappointed!
Attachments:
1.jpg 193 KB
2.jpg 203 KB
7.jpg 200 KBi also facing this kind of issue(dark colours are in purple)....i contact with nokia care ...they don't even understood and they are tying to teach me that, this is not a problem this is a colour effect caused in N8..
i really feedup about this issue...
Attachments:
IMG_0579.JPG 1214 KB
IMG_0582.JPG 1478 KB
IMG_0585.JPG 1576 KB -
Colour Display - an observation
The display of colour, colour profiling and calibration are frequently asked about in these forums. I've always felt that as Elements is not a colour managed application it is not usually worthwhile spending too much time on it. Working in full Photoshop today, the following screenshot really demonstrates this. All three images are of the identical PSD format file, produced from a RAW file in full Photoshop. All three are clearly very different. The leftmost is from the PSE Editor, the centre from full Photoshop, and the (truly awful) rightmost from the Elements Organiser.
Both the Elements Editor and Organiser are set to 'Optimize for Printing', Photoshop for 'Europe Prepress 3'.
I'm posting this as an observation, rather than a question, but would be interested to hear other opinions about colour management in Elements.
Cheers,
Neale
Insanity is hereditary, you get it from your children
If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.MichelBParis wrote:
What I can't say is why the PSE Editor and PS views of the same file have clearly different tones (you may need to click the screenshot to see this more obviously).
Yes, I can see that, and there must be a reason, perhaps a bug.
While I generally try and resist the notion that problems may be bugs, preferring to find a logical reason for software behaviour, I think you may be right.
I thought I'd try and recreate the scenario. As the screenshots were all of a RAW Image opened in full PS, cropped and saved as a .PSD (no jpegs involved anywhere) I went back to the original RAW image to start again - and saw it's thumbnail in the Organizer is also now showing as oversaturated. I deleted its sidecar file in case that had affected it somehow and refreshed the thumbnail but to no avail - it stays showing as oversaturated. However viewing its thumbnail in Windows Explorer looks fine, so somewhere in the workflow the Organizer view of the image just goes wrong.
Tomorrow I'll recover the original from backup, rename it and reimport it to see what happens.
Cheers,
Neale
Insanity is hereditary, you get it from your children
If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks. -
Can I have a LOV for display and a LOV for select values in a form ?
My LOV are in table :
lov_return, lov_display, lov_available
To avoid a loss in translating lov_return in lov_display values, I manage a flag, lov_available, Y/N to filter out obsoleted values.
By example, at the beginning of using the application, I have :
LOV_RETURN
LOV_DISPLAY
LOV_AVAILABLE
1
TOP
Y
2
CENTER
Y
3
BOTTOM
Y
And I have records with 1, 2 or 3 in the field corresponding with the LOV.
So far, so good.
Then I want to have a slightly different set of values in my LOV, for new records :
LOV_RETURN
LOV_DISPLAY
LOV_AVAILABLE
1
TOP
Y
2
CENTER
N
3
BOTTOM
Y
4
CENTER-TOP
Y
5
CENTER-BOTTOM
Y
So, when I edit an old record in my form, I want the 2 to be well deciphered into CENTER, and in the SELECT list, I want TOP,BOTTON,CENTER-TOP,CENTER-BOTTOM.
When I assign the dynamic LOV : select lov_display d,lov_return r from lov_table where lov_available = 'Y', to the corresponding field in my FORM, even allowing extra values will not help and will display '2' instead of 'CENTER'.
Is there a way I can manage to show the translated 'CENTER' in the field, and offer a list of values taking in account the 'availability' of the value, other than including the PX_FIELD test in my SQL for the dynamic LOV ?A common logical problem I encountered back the days of Oracle Forms.
A solution I often see is displaying invalid options with an asterisk, and applying validation to ensure users don't change to invalid selection.
No doubt there are some clever ways to tart this up with jQuery, also.
Scott -
hi i need to display my header of alv in colour format...
can u tell me function module what is used for this requirement.....
advance thanks ........................urgentHi Dasr,
What do you mean by header of ALV? Do you mean column header or a box where we can write our own text?
Regards,
kiran i
Maybe you are looking for
-
Replay video in Muse (some controls doesn't work)
Hello colleagues, Can't understand what is happening. I put a video in the Animate and assign controls for buttons (for example, replay video from 0:00 sec). For stage and video autoplay function are disabled. Then I export the oam-file and insert it
-
After effects and premier render farm
Hey Im working on a Mac Pro mid2010 and Mac pro Late 2013. I want to know if and how can I work on one of them but when I render or creating ram previews make them "work together" ? like a render farm ... Thanks
-
hi all, I am working in oracle forms 6i and i am trying to run report from form while press one of the push-button. works fine upto 2nd line from the begin key-word.After that its showing error like " FRM-40738:Argument 1 to builtin REPORT_OBJECT_STA
-
Canon 5D Mark III wont power up
I just brought home my brand new 5D Mk III, charged the battery up, mounted the lens (24-105), inserted the CF card and then the battery. Switched it on and no sign of life at all. Removed the battery, lens and CF card and then re-installed the bat
-
Hi, Problematic: I want to access from one PC to an autonomous application installed on another PC through an Ethernet connection with a web browser. Trials: LabVIEW is installed on PC1 but isn't on PC2. When I try in local on PC1 it works. When I tr