Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
9 replies Latest Post - ‏2013-04-04T09:17:19Z by SystemAdmin
SystemAdmin
SystemAdmin
7615 Posts
ACCEPTED ANSWER

Pinned topic HTML Attribute properties and embedded Javascript

‏2013-03-29T14:53:38Z |
Hello All,

Should be a easy issue but I am overlooking something. I am trying to dynamically set the style attribute for a output text widget. I am trying to use the HTML Attributes property set and the Value property indicates that it accepts embedded javascript but when I look at the HTML generated, it has the literal value instead of the evaluated value.

I have tried the following:

<#=tw.local.messageStyle#> (I would expect this to be correct)
<#tw.local.messageStyle#>
<#=tw.local.messageStyle.toString()#>
Thanks in advance,
Mike
Updated on 2013-04-04T09:17:19Z at 2013-04-04T09:17:19Z by SystemAdmin
  • kolban
    kolban
    3315 Posts
    ACCEPTED ANSWER

    Re: HTML Attribute properties and embedded Javascript

    ‏2013-03-29T14:56:07Z  in response to SystemAdmin
    Hi Mike, what version of the product/coaches are you using?

    Neil
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: HTML Attribute properties and embedded Javascript

      ‏2013-03-29T14:59:56Z  in response to kolban
      Sorry Neil -

      I forgot to add that information. We are now on V8.0.1.
      • kolban
        kolban
        3315 Posts
        ACCEPTED ANSWER

        Re: HTML Attribute properties and embedded Javascript

        ‏2013-03-31T00:09:22Z  in response to SystemAdmin
        Well, for what it is worth, I too tested the same tests on my 8.0.1.1 and see exactly the same results as you describe. I think this is now worth of a defect report. Please post back if you decide to do that or if you would like me to do that. It may turn out that the defect result is that the meta definitions are no longer supported in v8 and that the resolution may be to remove the apparent markers that it is allowed from the PD tooling.

        Neil
        • MaheshGollamudi
          MaheshGollamudi
          61 Posts
          ACCEPTED ANSWER

          Re: HTML Attribute properties and embedded Javascript

          ‏2013-04-02T14:21:20Z  in response to kolban
          Am not sure wrapping them under single quotes help.Did you try that?For ex: '<#=tw.local..#>'

          Thanks & Regards
          Mahesh Gollamudi
          • SystemAdmin
            SystemAdmin
            7615 Posts
            ACCEPTED ANSWER

            Re: HTML Attribute properties and embedded Javascript

            ‏2013-04-03T23:22:04Z  in response to MaheshGollamudi
            Mahesh,

            I will give it a try when I get a chance. my first thought though is that it would change the style attribute to the literal value of <#=tw.local..#> . But I will certainly give it a try and post the results. Thanks for the suggestion.

            Mike
        • SystemAdmin
          SystemAdmin
          7615 Posts
          ACCEPTED ANSWER

          Re: HTML Attribute properties and embedded Javascript

          ‏2013-04-03T23:17:20Z  in response to kolban
          Sorry Neil - I was busy with a few other things. I think a defect report would be good, if only to solved the question of whether it is possible. I am thinking as you, that this particular functionality has been removed and the markers are only left. If it is easy for you to open the defect report, then go for it otherwise, I will when I get a chance. Thanks.

          Mike
  • SystemAdmin
    SystemAdmin
    7615 Posts
    ACCEPTED ANSWER

    Re: HTML Attribute properties and embedded Javascript

    ‏2013-04-03T23:04:44Z  in response to SystemAdmin
    Hi,

    If you can't achieve your goal with attributes you can use classes.
    Build a CSS file and set the component class value with the right value.

    This is an option if you are using style attributes.

    Regards,
    VF
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: HTML Attribute properties and embedded Javascript

      ‏2013-04-03T23:19:33Z  in response to SystemAdmin
      Hello VenFil,

      I was trying to reuse a field and change the style on the fly. Not sure how to do that within a static CSS file. Would be interested if you know how. Thanks.

      Mike
      • SystemAdmin
        SystemAdmin
        7615 Posts
        ACCEPTED ANSWER

        Re: HTML Attribute properties and embedded Javascript

        ‏2013-04-04T09:17:19Z  in response to SystemAdmin
        Hi,

        For answer you better I need to know what you aim for. Could you explain me better the behaviour you want to achieve?

        Regards,
        VF