Skip to main content
Inspiring
November 14, 2008
Answered

How do you change the title of a validation alert?

  • November 14, 2008
  • 1 reply
  • 545 views
Hello I have some <CFINPUT> code with validation onSubmit that is working well. The problem is my boss wants me to change the title text on the alert. The alert is generated by the <cfinput> validation and not actually in the code I write. How would I go about changing the title? To be clear this would be the title usually in blue in the alert window that has the X to close the window on the right hand side.

Here is a sample of my code that is using the validation...

Thanks in advance for your help!

Dave
    This topic has been closed for replies.
    Correct answer JR__Bob__Dobbs-qSBHQ2
    quote:

    Originally posted by: north.dave
    I am using <cfform> is that the same as using an HTML form?


    If the format attribute is "HTML" or omitted, then yes. The error messages created via cfinput are displayed in a Javascript alert dialog. The alert dialog can display a user defined message but the title cannot be changed.

    This is an older reference (but still accurate)
    http://docs.sun.com/source/816-6408-10/window.htm#1201497

    1 reply

    Inspiring
    November 14, 2008
    > How would I go about changing the title?

    If you are using an html form, you cannot. For flash forms see asfusion.com:
    http://www.asfusion.com/blog/entry/alert-box-for-cfform
    Inspiring
    November 14, 2008
    I am using <cfform> is that the same as using an HTML form?
    JR__Bob__Dobbs-qSBHQ2Correct answer
    Inspiring
    November 14, 2008
    quote:

    Originally posted by: north.dave
    I am using <cfform> is that the same as using an HTML form?


    If the format attribute is "HTML" or omitted, then yes. The error messages created via cfinput are displayed in a Javascript alert dialog. The alert dialog can display a user defined message but the title cannot be changed.

    This is an older reference (but still accurate)
    http://docs.sun.com/source/816-6408-10/window.htm#1201497