|
-
Jun 21st, 2002, 09:42 AM
#1
Thread Starter
Frenzied Member
(javascript & css) Where is the syntax error?
(I know I promised nver to post on friday before my 3rd cup of coffee but I'm stuck)
I am getting a syntax error on this line
Code:
parent.frames[0].document.getElementById(DivDay).style.z-index = '-1';
probably something silly.
Thanks in advance,
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 21st, 2002, 09:58 AM
#2
Thread Starter
Frenzied Member
Just so no one is worried I found another way around it. Would still like to know where the error is though.
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 21st, 2002, 10:00 AM
#3
Frenzied Member
Didn't you just forget to put quote marks around the DivDay bit?
-
Jun 21st, 2002, 10:05 AM
#4
Thread Starter
Frenzied Member
Sorry, should have given more info.
Code:
DivDay = 'cell1_7';
parent.frames[0].document.getElementById(DivDay).style.background = '#cccccc';
parent.frames[0].document.getElementById(DivDay).style.cursor = 'default';
parent.frames[0].document.getElementById(DivDay).style.z-index = '-1';
Good try though... Thats my error 99% of the time 
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 21st, 2002, 10:12 AM
#5
Fanatic Member
Three questions:
1) Have you tried putting double quotes around cell_7 instead of single?
2) Why even have a variable?
3) What browser are you testing this in?
-
Jun 21st, 2002, 10:22 AM
#6
Thread Starter
Frenzied Member
1) Have you tried putting double quotes around cell_7 instead of single?
No, but the only line that is getting the error is the z-index one... the others work fine w/o it.
2) Why even have a variable?
Because I build that code via ASP and javascript was giving me problems doing it inside of the parens... plus I only have to build the asp part once this way.
3) What browser are you testing this in?
IE 5.5 but would like for it to be to standards. I am new to trying standards so if you see anything that is non-compliant let me know 
Thanks,
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 21st, 2002, 10:33 AM
#7
Fanatic Member
ahh its zIndex not z-index
-
Jun 21st, 2002, 10:36 AM
#8
Thread Starter
Frenzied Member
hmmm... odd. Is it that way in the style sheet also? (because I am using z-index there and it is fine but that could be a fluke).
Thanks!
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 21st, 2002, 10:36 AM
#9
Fanatic Member
Code:
parent.frames[0].document.getElementById(DivDay).style.z-index
Theres you problem, its z-index if you are using css but if you are setting it with DHTML its actually just zIndex. Javascript doesn't like the - so its removed.
Take a look here to see what I mean...
http://msdn.microsoft.com/workshop/a...asp?frame=true
-
Jun 21st, 2002, 10:42 AM
#10
Thread Starter
Frenzied Member
OK, cool. Thanks a bunch guys.
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|