Menu

#5 onblur attribute value is not generated correctly

0.7.4-SNAPSHOT
open
adam
Javascript (3)
5
2007-04-02
2007-03-30
Jonni Gani
No

When generating the onblur attribute, <layout:date> combines its own value with that supplied by the JSP author. It does so without providing any delimiter between the two.

For example if I were to write:

<layout:date onblur="alert('hello');" />

the generated HTML would read:

<input onblur="validateDateRangeAndFocus()alert('hello');" />

Note the lack of any meaningful separator between validateDateRangeAndFocus() and alert().

Is this an intended behavior? If so, I could fix the problem by manually inserting an acceptable separator, such as a semi-colon or the || operator.

I discovered this in 0.7.4-SNAPSHOT but the bug could've been inserted prior to it.

Discussion

  • adam

    adam - 2007-03-30
    • assigned_to: nobody --> adam_boas
     
  • adam

    adam - 2007-03-31
    • status: open --> closed
     
  • adam

    adam - 2007-03-31

    Logged In: YES
    user_id=1700141
    Originator: NO

    This has been fixed and is in SVN. It will be in the next 0.7.5-SNAPSHOT build.

     
  • Jonni Gani

    Jonni Gani - 2007-04-02
    • status: closed --> open
     
  • Jonni Gani

    Jonni Gani - 2007-04-02

    Logged In: YES
    user_id=1102026
    Originator: YES

    What does the fix do? Does it append a semi-colon?

     
  • adam

    adam - 2007-04-02

    Logged In: YES
    user_id=1700141
    Originator: NO

    yes, isn't that what you asked for?

     
  • Jonni Gani

    Jonni Gani - 2007-04-02

    Logged In: YES
    user_id=1102026
    Originator: YES

    At this point I'm not fussed with how the tag generates the onblur value. I was after a clarification as to what the intended behaviour was so that I could code my JavaScript accordingly. And yes, the appended semi-colon works for me. Thanks :-)

     

Log in to post a comment.