Thu, 01 Apr 2004
CSS and JavaScript fun

I learned something today.

When a javascript snippet to change css properties in a page -- in this case, hiding and unhiding chunks of text -- fails on both mozilla and IE, but works on Safari, something is screwy. Nobody says much on the web about the error generated:

Exception ``[Exception... "Access to restricted URI denied" code: "1012" nsresult:...

It turns out that the restricted URI involved (though nothing actually gives the URI) is the imported stylesheet, which lives on a different server. Even though the actual css rules I was changing were in the local html file itself, if there are any off-server css rules at all, JavaScript can't edit them.

So. Now you know. (Mostly this is blogged because it was much too painful finding this out on my own. What finally tipped me off was an entry at slayeroffice on the site's CSS viewing bookmarklet.)

Archives:
January 2018
S
M
T
W
T
F
S
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
Dec     Feb


Search this blog:
Search the blogs I read:
www.flickr.com
Taper Wickel's photos More of Taper Wickel's photos