student101
09-11-2008, 09:52 PM
How to validate the javscript parts?
I know of the <!-- // and end in // --> or
//<![CDATA[ and end in //]]>
Using xhtml1-transitional DOCTYPE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<a href="page.php" onmouseover="showtext('<div style="padding-left:40px"><a href=\'link1.php\'>Link1</a> | <a href=\'link2.php\'>Link2</a> | <a href=\'link3.php\'>Link3</a></div>','a', 'No')" onmouseout="hidetext()">Page1</a><img src="img/submenu.gif" alt=" " name="a" border="0" />
I managed to get it down to 29 Errors, 28 warning(s) , complaining about;
character "<" is the first character of a delimiter but occurred as data
Cheers
rangana
09-12-2008, 03:00 AM
Have you try on changing ' into ".
- Changing < into <.
- Changing > into >.
<a href="page.php" onmouseover="showtext("<div style="padding-left:40px"><a href=\"link1.php\">Link1</a> | <a href=\"link2.php\">Link2</a> | <a href=\"link3.php\">Link3</a></div>","a", "No")" onmouseout="hidetext()">Page1</a><img src="img/submenu.gif" alt=" " name="a" border="0" />
student101
09-12-2008, 07:16 AM
I've tried that, if changed the menu.php only show the text not the menu any more.
Not sure why though; Entire menu below:
<div id="menu">
<a href="index.php" onmouseover="showtext('', '', 'No')">Home</a><img src="img/transparent.gif" alt=" " name="f" border="0" /> | <a href="aboutus.php" onmouseover="showtext('<div style="padding-left:40px"><a href=\'membership.php\'>Membership</a> | <a href=\'invitation.php\'>Invitation</a> | <a href=\'contactus.php\'>Contact us</a></div>','a', 'No')" onmouseout="hidetext()">About us</a><img src="img/submenu.gif" alt=" " name="a" border="0" /> | <a href="training.php" onmouseover="showtext('<div style="padding-left:120px"><a href=\'courses.php\'>Courses</a> | <a href=\'training_archives.php\'>Archives</a></div>', 'b', 'No')">Training</a><img src="img/submenu.gif" border="0" alt=" " name="b" /> |
<a href="events.php" onmouseover="showtext('<div style="padding-left:110px"><a href=\'r_central.php\'>Central</a> | <a href=\'r_eastern.php\'>Eastern</a> | <a href=\'r_southern.php\'>Southern</a> | <a href=\'events_archives.php\'>Archives</a></div>','c', 'No')" onmouseout="hidetext()">Events</a><img src="img/submenu.gif" border="0" alt=" " name="c" />
| <a href="news.php" onmouseover="showtext('<div style="padding-left:150px"><a href=\'articles.php\'>Articles</a> | <a href=\'publications.php\'>Publications</a> | <a href=\'news_archives.php\'>Archives</a></div>','d', 'No')" onmouseout="hidetext()">News</a><img src="img/submenu.gif" border="0" alt=" " name="d" /> |
<a href="links.php" onmouseover="showtext(' ', '', 'No')">Links</a>
</div>
You can test both, your idea below:
<div id="menu">
<a href="index.php" onmouseover="showtext('', '', 'No')">Home</a><img src="img/transparent.gif" alt=" " name="f" border="0" /> | <a href="aboutus.php" onmouseover="showtext('<div style="padding-left:40px"><a href=\'membership.php\'>Membership</a> | <a href=\'invitation.php\'>Invitation</a> | <a href=\'contactus.php\'>Contact us</a></div>','a', 'No')" onmouseout="hidetext()">About us</a><img src="img/submenu.gif" alt=" " name="a" border="0" /> | <a href="training.php" onmouseover="showtext('<div style="padding-left:120px"><a href=\'courses.php\'>Courses</a> | <a href=\'training_archives.php\'>Archives</a></div>', 'b', 'No')">Training</a><img src="img/submenu.gif" border="0" alt=" " name="b" /> |
<a href="events.php" onmouseover="showtext('<div style="padding-left:110px"><a href=\'r_central.php\'>Central</a> | <a href=\'r_eastern.php\'>Eastern</a> | <a href=\'r_southern.php\'>Southern</a> | <a href=\'events_archives.php\'>Archives</a></div>','c', 'No')" onmouseout="hidetext()">Events</a><img src="img/submenu.gif" border="0" alt=" " name="c" />
| <a href="news.php" onmouseover="showtext('<div style="padding-left:150px"><a href=\'articles.php\'>Articles</a> | <a href=\'publications.php\'>Publications</a> | <a href=\'news_archives.php\'>Archives</a></div>','d', 'No')" onmouseout="hidetext()">News</a><img src="img/submenu.gif" border="0" alt=" " name="d" /> |
<a href="links.php" onmouseover="showtext(' ', '', 'No')">Links</a>
</div>
I am going to throw it out there; this is the only part that does not validate, it's javascript not html; does it really matter?
Cheers
student101
10-28-2008, 08:32 AM
Chrome CSS Drop Down Menu (v2.4)
http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm
Could I not use the Chrome CSS Drop Down Menu and make it do what I need?
May have found a solution;
http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
Cheers
student101
04-25-2009, 06:38 AM
Please could an Admin or Moderator remove or change the links
www[dot]socsat[dot]co.za on this thread, please.
Thank you.