By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

WebTextEdit ClientSideEvent Javascript-Can't Eval

100+
P: 200
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").style.bac kgroundColor = '#F0F5F7';

But when I want to change the style of the WebTextEdit control:
document.getElementById("WebTextEdit1").style.back groundColor = '#F0F5F7'; Then nothing happens

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

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

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

Please Help
Oct 13 '08 #1
Share this Question
Share on Google+
5 Replies


acoder
Expert Mod 15k+
P: 16,027
What is this "WebTextEdit" object? Does it have an ID?
Oct 13 '08 #2

100+
P: 200
Hi, Thank You for the assistance Yes, I am using the id.

But on the same event I can change another WebTextEdit object:
document.getElementById("EP1020ReadOnly").style.ba ckgroundColor = 'red';

so I tried for current object: (don't work)
document.getElementById("FG1010NItemD").style.back groundColor = 'red';
var ws = document.getElementById("FG1010NItemD").style; ws.borderWidth = "1px"; ws.borderStyle = "solid"; ws.borderColor = "#FFE6A0"

Please Help - I need to get this going!
document.getElementById("EP1010Read").style.backgr oundColor = 'red';
EP1020ReadOnly.style.backgroundColor = 'red'; document.getElementById("EP1010Read").style.backgr oundColor = 'red';
document.getElementById("EP1010Object").style.back groundColor = 'red';
Oct 13 '08 #3

acoder
Expert Mod 15k+
P: 16,027
Can you show the HTML code for this element?
Oct 13 '08 #4

100+
P: 200
Thank You very much, I got it going:

var edit = igedit_getById("FG1010NItemD"); edit.Element.style.backgroundColor = 'red';


but now I need to execute this code within a vbscript
Oct 14 '08 #5

acoder
Expert Mod 15k+
P: 16,027
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.
Oct 14 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.