locked
How to change Attributes value of xml node at runtime through javascript RRS feed

  • Question

  • Hi,

    How i  change xml elements attribute  value at runtime through javascript .

    Thanks

     

    Monday, February 26, 2007 1:12 PM

Answers

  • Hi Dinesh,

    If u are trying to set an specified property u can use:

    object.SetValue(propertyName, value)

    Sample :

        // Set the property value using the SetValue method.
       sender.setValue("opacity", 0.5);
    cya
    Monday, February 26, 2007 6:46 PM

All replies

  • Hi Dinesh,

    If u are trying to set an specified property u can use:

    object.SetValue(propertyName, value)

    Sample :

        // Set the property value using the SetValue method.
       sender.setValue("opacity", 0.5);
    cya
    Monday, February 26, 2007 6:46 PM
  • Note that we now encourage the use of the dot "." notation to set a value:

    sender.opacity = 0.5;
     
    -mark
    Program Manager
    Microsoft
    This post is provided "as-is"
    Monday, February 26, 2007 7:49 PM
  • I've noticed that the syntax

    sender["opacity"] = 0.5;      also works

    Is this a recommended practise?

    Monday, February 26, 2007 8:05 PM
  • The sender["propertyName"] is only recommended (required) for attached properties like Canvas.Left:

    sender["Canvas.Left"] = 5;
     
    -mark
    Program Manager
    Microsoft
    This post is provided "as-is"
    Monday, February 26, 2007 9:42 PM