Announcement

Collapse
No announcement yet.

Form. Ajax event on_click on user field

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form. Ajax event on_click on user field

    Dear friends,

    I have a mysql db with a table with two fields: ‘id’ and ‘nombre’.

    I define a form type editable-grid. I add a user field ‘imagen’.

    This 'imagen' is a HTML image type field (an icon, in fact).
    If I try to define an Ajax event on_click on it, (i.e. to display a message), as I did with a grid application, I can’t select user’s fields but only table fields.

    In fact, I could add 'Imagen' user field and use 'edit link' to call a blank app and do things but I think this is a dirty way for doing things.

    Is this a bug on SC?

  • #2
    No, this works as designed. I made a feature request regarding this half a year ago.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Hi Albert,

      I just imagine it. Thank you very mach anyway.

      JM

      Comment


      • #4
        Hello,

        Issue reported to our bugs team.

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          I have the same problem, I need to do something similar, except that when given click this field, I need to validate an information, as you can resolve this?
          Leandro Carames
          http://www.softnetbaires.com.ar

          Comment


          • #6
            Hi,
            this might be a workaround.
            Create a field of type Text.
            Define a css-button in ScriptInit: (it just looks better)
            print ("<style type='text/css'>.mybtn
            {
            color: #FFFFFF;
            border: 1px solid #FFFFFF;
            font-weight: bold;
            background: #45779A;
            height: 30px;
            }

            .mybtn:hover
            {
            cursor: pointer;
            background: #558ab3;
            }
            </style>");

            In the OnLoad section:
            {your_field} = "<button class='mybtn' onclick='your_javascript_method()'type='button'>Cl ick Me</button>";

            In 'your_javascript_method' do the necessary operations.

            Hope this helps
            jsb

            Comment

            Working...
            X