![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Dear group, I need to put the following statement on my site: script type="text/javascript" src="css_dropdown.js"></script body onload="enableDropdownMenuForIE();" Unfortunately this code is XHTML. I need this in HTML. Any suggestions please? Thank you for reading me Inge Grotjahn |
#3
| |||
| |||
|
|
body onLoad="enableDropdownMenuForIE();" |
|
Or to be really daring, you could try - body onload="enableDropdownMenuForIE();" |
#4
| |||
| |||
|
|
Hi Murray:-) Am 19.08.2006 schrieb Murray *ACE*: body onLoad="enableDropdownMenuForIE();" I did this and it doesn't validate:-( Here is the link to my page: http://www.gwsystems.com/testsite/gbandit.htm and the validation result: Below are the results of attempting to parse this document with an SGML parser. Error Line 61 column 41: document type does not allow element "BODY" here. body onLoad="enableDropdownMenuForIE();" The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). Or to be really daring, you could try - body onload="enableDropdownMenuForIE();" I did this too and it doesn't validate:-( Below are the results of attempting to parse this document with an SGML parser. Error Line 61 column 41: document type does not allow element "BODY" here. body onload="enableDropdownMenuForIE();" The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error). Any other suggestion please? So frustrated Inge Grotjahn |
#5
| |||
| |||
|
|
So it's validation you're after? |
|
Then change this - body onLoad="enableDropdownMenuForIE();" to this - body and this - /body to this - script type="text/javascript">enableDropdownMenuForIE();</script /body |
|
Or better yet, get rid of that script altogether. What is it doing and why do you need it? |
#6
| |||
| |||
|
|
Dear Murray:-) Am 19.08.2006 schrieb Murray *ACE*: So it's validation you're after? Yes. Then change this - body onLoad="enableDropdownMenuForIE();" to this - body and this - /body to this - script type="text/javascript">enableDropdownMenuForIE();</script /body Thank you, that works fine and validates:-) But... Or better yet, get rid of that script altogether. What is it doing and why do you need it? ...I wanted to have a css-driven horizontal dropdown-menu, which validates and works in many browsers:-) Unfortunately this menu needs a javascript to work with IE:-( Without the script, the menu will not drop down:-( And even with the script, the menu is not really functional in IE:-( This is because I'm not good enough to find an apropriate fix for IE:-( I think, I get rid of that menu anyway and look for another solution. I like css express drop-down menu by PVII. Unfortunately it has only 1 sublevel, I need 2 sublevels. And what happens, when someone has turned off Java? I would like my menu to be accessible even in that case. Maybe you have a hint for me, where to look free of cost for such a menu? Thank you for your help Inge Grotjahn |
#7
| |||
| |||
|
|
You are asking for XHTML solutions on a page that is HTML transitional. Or were you looking for the other way around? |
#8
| |||
| |||
|
|
Am 20.08.2006 schrieb Murray *ACE*: You are asking for XHTML solutions on a page that is HTML transitional. Or were you looking for the other way around? That's it:-) The snippet of code was XHTML and I was looking for a HTML solution :-) Greetings Inge Grotjahn |
#9
| |||
| |||
|
|
Then we could go back to the <body onLoad thing. That works.... |
#10
| |||
| |||
|
|
Am 21.08.2006 schrieb Murray *ACE*: Then we could go back to the <body onLoad thing. That works.... Yes, that works, but it won't validate as said a few postings before. Greetings, Inge Grotjahn |
![]() |
| Thread Tools | |
| Display Modes | |
| |