Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Problem buffering a color in an attribute. Please help.
Junior Member

Posts: 4
Registered: 11/20/2007
Member Is Offline
posted on 9/28/2009 at 10:51 AM Reply With Quote
Problem buffering a color in an attribute. Please help.


I'm trying to pick a color, to store it in the "value" attribute or the caller (<input> element), and right after to call a function that changes either the foreground or the background color of several elements, using the value stored previously.

My code is something like :

<input id="intro_area_text_color" class="color_picker" onclick="javascript:TCP.popup(this);
var bgColor = this.value; alert(bgColor);
ChangeElementBackgroundColor(id, bgColor)" >

The TCSelect() function was set to :

function TCSelect(c) {
this.field.value = '#' + c.toString(); // Try to buffer the color;

Unfortunately, the message box shows that the value is not set. However, if one picks a color again, the caller <input> element then has its value set to the chosen color.

I cannot understand why the caller's "value" attribute is not set after the picker returns and why it is when one calls the picker again.

Can someone help ?
Many thanks in advance.

View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
 Product Demonstrations Live Demo
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum

Go To Top

Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004