HighDots Forums  

XHTML to HTML - translation help wanted

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss XHTML to HTML - translation help wanted in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Inge Grotjahn
 
Posts: n/a

Default XHTML to HTML - translation help wanted - 08-18-2006 , 02:16 PM






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

Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-18-2006 , 08:50 PM






<body onLoad="enableDropdownMenuForIE();">

Or to be really daring, you could try -

<body onload="enableDropdownMenuForIE();">

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Inge Grotjahn" <inge (AT) gwsystems (DOT) com> wrote

Quote:
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



Reply With Quote
  #3  
Old   
Inge Grotjahn
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-19-2006 , 07:26 AM



Hi Murray:-)

Am 19.08.2006 schrieb Murray *ACE*:

Quote:
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).

Quote:
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


Reply With Quote
  #4  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-19-2006 , 08:01 AM



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?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Inge Grotjahn" <inge (AT) gwsystems (DOT) com> wrote

Quote:
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



Reply With Quote
  #5  
Old   
Inge Grotjahn
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-19-2006 , 09:27 AM



Dear Murray:-)

Am 19.08.2006 schrieb Murray *ACE*:

Quote:
So it's validation you're after?
Yes.

Quote:
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...

Quote:
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


Reply With Quote
  #6  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-20-2006 , 09:04 AM



The methods I have seen are simple, list based menus, as I'm sure you have
seen hundreds of times. The javascript is used to CLOSE the submenus. If
the page is opened with javascript disabled, all of the submenus stay
revealed. Usually this is deadly to your layout, but c'est la vie.

I believe that the basic PVII menus do that, but I'm not sure right now.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Inge Grotjahn" <inge (AT) gwsystems (DOT) com> wrote

Quote:
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



Reply With Quote
  #7  
Old   
Inge Grotjahn
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-20-2006 , 05:58 PM



Am 20.08.2006 schrieb Murray *ACE*:

Quote:
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


Reply With Quote
  #8  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-20-2006 , 06:34 PM



Then we could go back to the <body onLoad thing. That works....

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Inge Grotjahn" <inge (AT) gwsystems (DOT) com> wrote

Quote:
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



Reply With Quote
  #9  
Old   
Inge Grotjahn
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-20-2006 , 07:16 PM



Am 21.08.2006 schrieb Murray *ACE*:

Quote:
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


Reply With Quote
  #10  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: XHTML to HTML - translation help wanted - 08-20-2006 , 08:40 PM



It certainly validates in HTML 4.01 transitional.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Inge Grotjahn" <inge (AT) gwsystems (DOT) com> wrote

Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.