Skip to Content
author's profile photo
Former Member

Triggering OnBlur of <PHMLB:formlayoutInputField>

Hi,

I want to trigger a Javascript function onBlur of an inputfield.

With HTMLB inputfield I use the following as a wrapper around my inputfield.

<bsp:findAndReplace find = "<input"

replace = "<%= tmp_string %>" >

What should I use in case of PHTMLB formlayoutInputfield?

Thanks & Regards

Tejaswini

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Jan 25, 2005 at 03:57 PM

    A simple phtml:formlayoutinputfield is rendered as

    a lot of lines of code, addtionally it offers no place to have your own onblur declaration.

    The renderign of the Input tag occurs after the formlayout has been rendered therefor the bsp directive to find and replace should be placed out side the formlayout

    ***************************

    <bsp:findAndReplace find = "<%= replace_txt %>"

    replace = "<%= tmp_string %>" >

    <phtmlb:formLayout>

    <phtmlb:formLayoutInputField id = "firstName"

    label = "First Name"

    value = "Mary"

    required = "true" />

    </phtmlb:formLayout>

    </bsp:findAndReplace>

    ***********************

    More over there may be more than one imput field in teh formlayout therefore i had to use teh following replace_txt and tmp_string

    ****************ABAP***********

    concatenate '<input type="Text" ' ' class="urEdfTxtEnbl"'

    ' autocomplete="off"' ' showlength="true" '

    ' id="firstName" ' into replace_txt.

    concatenate '<input type="Text" ' ' class="urEdfTxtEnbl"'

    ' autocomplete="off"' ' showlength="true" '

    ' id="firstName"' ' onblur="alert(''BLUR'')"'

    into tmp_string.

    *************************************

    I am not sure if the way of rendering for you will change could check it out, but this type of conversion will be potentially a high risk change given that the rendering may change.

    Regards,

    Aniruddha

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 25, 2005 at 08:33 PM

    The formLayout also has a <phtmlb:formLayoutItem> tag. This is a generic tag where you can place anything into one specific cell. This tag will take a body. The idea is that our <phtmlb:formLayoutInputField> has 20% functionality and solves 80% of the problems. If not enough, you use the item.

    Typical example, somebody wanted in one cell two input fields next to one another.

    <phtmlb:formLayoutItem label = "Surname,Name">
      <htmlb:inputField .../>
      <htmlb:inputField .../>
    </phtmlb:formLayoutItem>
    

    brian

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 25, 2005 at 02:50 PM

    You should be ok using the same find/replace strings ...

    In the end it's always the HTML <input> tag that is rendered, no matter if you use HTMLB or PHTMLB.

    Max

    Add comment
    10|10000 characters needed characters exceeded