|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
ForeColor Function with Dialogue box
I would like to know if anyone knows how to use the Javascript doforecol() that displays a dialoguebox or popup that gives the user a choices of colors to be selected?
|
|
#2
|
|||
|
|||
|
Re: ForeColor Function with Dialogue box
Quote:
Hello Javascript has nothing to do with doforecol(), its a user defined function. If you are trying to design a WYSIWYG type editor follow the link bellow, and you will find similar things that you are trying to do. http://www.devguru.com/features/tut...g/wysiwyg5.html http://www.devarticles.com/art/1/90 Thank You, |
|
#3
|
||||
|
||||
|
iahmed, it has everything to do with Javascript!
I think what you mean is that there is no actual doforecol() function as part of the JS API. You need to create it yourself. There are plenty of them on the net if you google. keywords would be "javascript color picker" |
|
#4
|
|||
|
|||
|
DoForeCol()
Thank you for the help!!
|
|
#5
|
|||
|
|||
|
hey,
have a look at this URL http://javascript.internet.com/page...lor-picker.html that has a color picker on it... then u can use the following code to add the selected colour to the WYSIWYG editor.. (I assume thats what you are using it for?) Just cut and paste the code from the URL above, and change the function called showColor() to the following Code:
function showColor(val) {
//document.colorform.hexval.value = val;
self.opener.doForeCol(val);
window.close();
That is used if you are making the colour selector popup.... so when the user clicks on a colour, it will place the forecol value in to the doForeCol function... which probably looks like: Code:
function doForeCol(val)
{
iView.document.execCommand('forecolor', false, val);
}
Hope that helps!! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > ForeColor Function with Dialogue box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|