WebTextEdit ClientSideEvent Javascript-Can't Eval

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ismailc
    New Member
    • Sep 2006
    • 200

    WebTextEdit ClientSideEvent Javascript-Can't Eval

    Hi, I urgently need help, please not sure of correct forum.

    WebtextEdit ClientSideEvent execute javascript statement on mousemove event. I can successfully change the style of another object type on this WebTextEdit ClientSide MouseMove event:document. getElementById( "Object2").styl e.backgroundCol or = '#F0F5F7';

    But when I want to change the style of the WebTextEdit control:
    document.getEle mentById("WebTe xtEdit1").style .backgroundColo r = '#F0F5F7'; Then nothing happens

    When I execute the script on the same WebTextEdit Clientside for another object which is not a WebtextEdit:
    Object2.style.b order='1px solid #FFE6A0'; Then it works

    But when I want to change the WebtextEdit Clientside style:
    WebTextEdit1.st yle.border='1px solid #FFE6A0';

    Then I get Error: Can't Eval WebTextEdit1.st yle.border='1px solid #FFE6A0';

    Please Help
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What is this "WebTextEdi t" object? Does it have an ID?

    Comment

    • ismailc
      New Member
      • Sep 2006
      • 200

      #3
      Hi, Thank You for the assistance Yes, I am using the id.

      But on the same event I can change another WebTextEdit object:
      document.getEle mentById("EP102 0ReadOnly").sty le.backgroundCo lor = 'red';

      so I tried for current object: (don't work)
      document.getEle mentById("FG101 0NItemD").style .backgroundColo r = 'red';
      var ws = document.getEle mentById("FG101 0NItemD").style ; ws.borderWidth = "1px"; ws.borderStyle = "solid"; ws.borderColor = "#FFE6A0"

      Please Help - I need to get this going!
      document.getEle mentById("EP101 0Read").style.b ackgroundColor = 'red';
      EP1020ReadOnly. style.backgroun dColor = 'red'; document.getEle mentById("EP101 0Read").style.b ackgroundColor = 'red';
      document.getEle mentById("EP101 0Object").style .backgroundColo r = 'red';

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Can you show the HTML code for this element?

        Comment

        • ismailc
          New Member
          • Sep 2006
          • 200

          #5
          Thank You very much, I got it going:

          var edit = igedit_getById( "FG1010NItemD") ; edit.Element.st yle.backgroundC olor = 'red';


          but now I need to execute this code within a vbscript

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            If you need to run it in vbscript, then it will only work in IE.

            If it's an IE-only application, e.g. intranet, you can just put the vbscript code in script tags (like JavaScript) and specify the type.

            Comment

            Working...