javascript problem asp.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • pl

    #1

    javascript problem asp.net

    1) build drop down list on server
    2) manipulating lists on the client using javascript
    3) when postback to server, lost the values that were
    manipulated on the client.
    4) how we defined to client js
    cboInternalOrig in.Attributes.A dd
    ("OnBlur", "CheckRequiredF ield()")
    4) why ? is there another way to define?
  • Jalil Vaidya

    #2
    Re: javascript problem asp.net

    If you are adding attributes to the dropdown control using client side
    scripting, they will be lost on server side because they are not part of
    post data. Either add the data to the value attribute and make sure the
    item is selected when submitting the form or add the data to the value
    of a hidden element which you can access from the server side on postback.

    Jalil Vaidya

    pl wrote:
    [color=blue]
    > 1) build drop down list on server
    > 2) manipulating lists on the client using javascript
    > 3) when postback to server, lost the values that were
    > manipulated on the client.
    > 4) how we defined to client js
    > cboInternalOrig in.Attributes.A dd
    > ("OnBlur", "CheckRequiredF ield()")
    > 4) why ? is there another way to define?[/color]

    Comment

    • Jalil Vaidya

      #3
      Re: javascript problem asp.net

      If you are adding attributes to the dropdown control using client side
      scripting, they will be lost on server side because they are not part of
      post data. Either add the data to the value attribute and make sure the
      item is selected when submitting the form or add the data to the value
      of a hidden element which you can access from the server side on postback.

      Jalil Vaidya

      pl wrote:
      [color=blue]
      > 1) build drop down list on server
      > 2) manipulating lists on the client using javascript
      > 3) when postback to server, lost the values that were
      > manipulated on the client.
      > 4) how we defined to client js
      > cboInternalOrig in.Attributes.A dd
      > ("OnBlur", "CheckRequiredF ield()")
      > 4) why ? is there another way to define?[/color]

      Comment

      Working...