Jump to content

fontcolor(


Tipiford

Recommended Posts

Hope I'm in the right forum, I'm having issues with a captcha error printing its message in color.I have tried too many lines of code in php, xhtml and css and this code within javascript was my final attempt; document.write(frmvalidator.addValidation("name","req","Enter your name").fontcolor("red")); but nothing I've tried will change the message color. Please tell me what I have wrong (or point me in the right direction).

Link to comment
Share on other sites

This doesn't make much sense to me. To change the font color of an element, you first must access the element. For example, with document.getElementById(). Then you set the CSS like this:document.getElementById("elementID").style.color = "red";

Link to comment
Share on other sites

Any changes in the css file have produced no changes in the php file, so the above code I placed in the php file. (The css file came with the captcha javascript that I've modified, so it's not like I've written any errors into it, just changed the file names--but maybe so.)The addValidation() is the returned string of the error (of not entering a name in the form). The php file and its corresponding css file came from www.html-form-guide.com's 'contact form with captcha'.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...