Error message color is not changed.

Help
Suma
2007-10-09
2013-04-22
  • Suma

    Suma - 2007-10-09

    Hi Patrick,
       Good morning. I was able to get the error message displayed next to the required field. But I am not able to get the message in red color nor the "X" for required items symbol. My code on page 0 is as follows:

    <script type="text/javascript">
    apexlib.error.init
      ( "t17Messages"
      , "t17Notification"
      , "#6699cc"
      , "#000000"
      , apexlib.error.DISPLAY_LOCATION.FIELD_AND_NOTIFICATION
      );
    apexlib.error.handleErrorPage();
    </script>

    Can please tell me what I am doing wrong, at your convenience.
    Rgds,
    Suma.
    P.S: Thank you so much for sharing this apexlib with all.

     
    • Patrick Wolf

      Patrick Wolf - 2007-10-09

      Hi Suma,

      you are welcome!

      The ApexLib framework uses for inline error messages the same label template configuration as APEX is using when you define a validation for the page item.

      You will see your used label templates in the "Shared Components" area of the page definition page. When you click on the link you will see the label template definition. The section "Error Display" is where you have to define how your label should be displayed when there is an error. If nothing is defined, a default of

      <img width="16" height="16" border="0" alt="Error" src="#IMAGE_PREFIX#inline_error.gif">

      and

      <br><span class="errTxt">#ERROR_MESSAGE#</span>

      is used. You can also check the HTML source for the used template the framework is sending to the browser part of the framework. You should see several lines of

      apexlib.field.addLabelTemplate(2,"<label for=\&quot;#CURRENT_ITEM_NAME#\&quot;><img src=\&quot;/i/themes/theme_7/asterix.png\&quot; alt=\&quot;\&quot; width=\&quot;10\&quot; height=\&quot;14\&quot; /><a class=\&quot;t7requiredwithhelp\&quot; href=\&quot;javascript:popupFieldHelp('#CURRENT_ITEM_ID#','367183687296855')\&quot; tabindex=\&quot;999\&quot;>","</a></label>","<img width=\&quot;16\&quot; height=\&quot;16\&quot; border=\&quot;0\&quot; alt=\&quot;Error\&quot; src=\&quot;/i/inline_error.gif\&quot;>","<br><span class=\&quot;errTxt\&quot;>#ERROR_MESSAGE#</span>");

      Do you also see a /i/inline_error.gif ? Does it work when you paste it into your browser?

      Patrick

       
    • Suma

      Suma - 2007-10-09

      Hi Patrick,
        Thank you for replying. I am using theme 17 for testing. And Optional label with help.
      In the label template, all I have is
      <div class="t17InlineError">
      and
      <br\&gt;#ERROR_MESSAGE#</div>

      I tried putting the img src next to <div> but I am getting an unterminated string error.

      Any suggestions.
      Thank you in advance,
      rgds,
      Suma.

       
      • Patrick Wolf

        Patrick Wolf - 2007-10-09

        Just remove the text from the "On Error Before Label" and "On Error After Label" and APEX and the ApexLib will use the default template as I have described above.

        But don't ask me why the read (x) image is displayed above the label, or at least in my quick example I did.

        Patrick

         
    • Suma

      Suma - 2007-10-09

      Hi Patrick,
        I am having trouble getting the inline_error.gif displayed next to the label and change colour of label to red.
      I am using theme 10 now and in the template of optional label with help I have:

      <div class = "t10InlineError">

      and <br/>#ERROR_MESSAGE#</div>

      I tried to put hte img src in with div tag but of no avail. Can you please help me.
      rgds,
      Suma.

       
    • Suma

      Suma - 2007-10-09

      Hi Patrick ,
        thank you for your response. please disregard my second post. I thought that my previous reply did not get posted properly. Thank you so much. Have a nice evening.

      Rgds,
      Suma.

       

Log in to post a comment.