473,320 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

IE javascript, how to change style of element (works in firefox)

27
Hi,

I need to change the style of an element and it seems to work fine in FF, but not in IE.

Here's my statement :

ucId.style.cursor = 'wait';

where ucId is a user control created by vb.net.

Is my sintax ok for IE?

Thanks
Nov 7 '07 #1
5 8425
acoder
16,027 Expert Mod 8TB
The syntax is correct - see link.

How are you referring to this user control element? Do you get any errors?
Nov 8 '07 #2
phfle1
27
here is my function

Expand|Select|Wrap|Line Numbers
  1. function wait(ucId)
  2.   {
  3.      var browser;
  4.      document.body.style.cursor = 'wait';
  5.      var tab = getElementsByID(ucId);
  6.      ucId.syle.cursor = 'wait';
  7. }
  8.  
on execution, ucId = "ctl00_PlaceHolderMain_usrPageTransactionnelle "

but I get an error : object needed on the line

var tab = getElementsByID(ucId);

Something weird about that is that the ucId is not present in the source of the html page.
Nov 9 '07 #3
acoder
16,027 Expert Mod 8TB
First of all, the syntax is incorrect. It should be document.getElementById(ucId). JavaScript is case-sensitive. Note no "s" and D is lower-case.

Secondly, on the last line, you should be using the object (tab.style.cursor), not the ID.
Nov 9 '07 #4
phfle1
27
thanks for the help

-P
Nov 27 '07 #5
acoder
16,027 Expert Mod 8TB
You're welcome. Glad you got it working.
Nov 27 '07 #6

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

Similar topics

8
by: chrisdude911 | last post by:
how do i add video into a javascript web page with my own custom buttons?
12
by: tim | last post by:
I am using foldoutmenu 3 and am having problems with viewing my menus in firefox. On my sub3 menus i have more than one line of text in some places. firefox does not recognise that there is more...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.