How to create a horizontal menu?

Am using studio creator 2 and there is no provision to create a horizontal drop down menu. how do i make one? (a list of items will drop down when the mouse hovers over a menu item)

I have used samples from http://www.milonic.com and i am supposed to add this to the page using the menu::

<script type="text/javascript" src="milonic_src.js"></script>

<noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript>

<script type="text/javascript">

if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");

else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");

</script>

<script type="text/javascript" src="menu_data.js"></script>

however, there are problems with the this part

"<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>"

can someone help me please.......i need this urgently :-(

[1064 byte] By [fresher-newbie] at [2007-11-26 6:53:12]
# 1
> however, there are problems with the this partWhich kind of problems? Any error messages?
KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 2
this is the error::element type "scr" must be followed by either attributes specifications, > or />
freshernewbie at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 3
At which time does this error appear? Compilation, deployment, runtime? Can you post the complete source for your jsp page?Thanks,Kirill
KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 4
am so confused...totally helpless now. can u give me a step-by-step guide on how to create a menu? pleeeeeease!!!
freshernewbie at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 5

Well... As you have notices, Creator does not provide this capability out of the box, so you need to attach something third-party or create the menu yourself. The second choice is rather tricky, so we should look for something that is already available. You chose to take the one from http://www.milonic.com , but it does not immediately work, showing error messages.

Now we have to find the cause for these and fix them. After that you will be all set and with a horizontal DHTML menu :-) Please answer the questions that I've posted in my previous message.

Thanks,

Kirill

KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 6
it is a syntax error.I have tried http://otrix.com and imported otrix-webstudio.complib to the palette but my problem now is that i cannot drag n drop components into the page.Message was edited by: fresher-newbie
freshernewbie at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 7

And at which moment does this syntax error appear? Immediately when you insert this text into your page's source, or when you deploy the page, or when you try to access it? Again, it would greatly help, if you could post the source of the jsp page that you are creating.

Thanks,

Kirill

KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 8
I've tryed pasting the code you showed in your first message and it compiled and can be deployed to Tomcat just fine.
KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 9

<?xml version="1.0"?>

<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">

<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>

<f:view>

<ui:page binding="#{Page1.page1}" id="page1">

<ui:html binding="#{Page1.html1}" id="html1">

<ui:head binding="#{Page1.head1}" id="head1">

<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>

</ui:head>

<ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">

<ui:form binding="#{Page1.form1}" id="form1">

<script type="text/javascript" src="milonic_src.js"></script>

<noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript>

<script type="text/javascript">

if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");

else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");

</script>

<script type="text/javascript" src="menu_data.js"></script>

</ui:form>

</ui:body>

</ui:html>

</ui:page>

</f:view>

</jsp:root>

the error occurs immediately after i insert the code in the first post

freshernewbie at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 10

Well... Just a shot in the dark - try :

<ui:form binding="#{Page1.form1}" id="form1">

<![CDATA[

><script type="text/javascript" src="milonic_src.js"></script>

<noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript>

<script type="text/javascript">

if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");

else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");

</script>

<script type="text/javascript" src="menu_data.js"></script>

]]>

</ui:form>

KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 11

The thing is that your JSP is an xml file (which is not always the case) and therefore constructs such as "<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>"

violate its wellformedness. The <![CDATA[ section tells the parser to treat its contents as plaing text, not as XML markup, thus allowing any symbols inside.>

KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 12
i have done what u told me and there are no errors. But then after i deployed it nothing happens (i get a blank page...which is not what i wanted)
freshernewbie at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 13
Have you looked at the source of this "blank" page? What's in there?
KSorokin at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 14

this is the what is there at the source of the blank page::

<?xml version="1.0"?>

<!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 content="no-cache" http-equiv="Pragma" />

<meta content="no-cache" http-equiv="Cache-Control" />

<meta content="no-store" http-equiv="Cache-Control" />

<meta content="max-age=0" http-equiv="Cache-Control" />

<meta content="1" http-equiv="Expires" />

<title></title>

<script type="text/javascript" src="/homePage/theme/com/sun/rave/web/ui/defaulttheme/javascript/formElements.js"></script>

<link rel="stylesheet" type="text/css" href="/homePage/theme/com/sun/rave/web/ui/defaulttheme/css/css_master.css" />

<link rel="stylesheet" type="text/css" href="/homePage/theme/com/sun/rave/web/ui/defaulttheme/css/css_ie55up.css" />

<script type="text/javascript">

var sjwuic_ScrollCookie = new sjwuic_ScrollCookie('/home.jsp', '/homePage/faces/home.jsp');

</script>

<link id="link1" rel="stylesheet" type="text/css" href="/homePage/resources/stylesheet.css" />

</head>

<body id="body1" style="-rave-layout: grid">

<form id="form1" class="form" method="post" action="/homePage/faces/home.jsp" enctype="application/x-www-form-urlencoded">

<script type="text/javascript" src="resources/milonic_src.js"></script>

<noscript><a href="http://www.milonic.com/">JavaScript Menus and DHTML Menus Powered by Milonic</a></noscript>

<script type="text/javascript">

if(ns4)_d.write("<scr"+"ipt type=text/javascript src=resources/mmenuns4.js><\/scr"+"ipt>");

else _d.write("<scr"+"ipt type=text/javascript src=resources/mmenudom.js><\/scr"+"ipt>");

</script>

<script type="text/javascript" src="resources/menu_data.js"></script>

<input id="form1_hidden" name="form1_hidden" value="form1_hidden" type="hidden" />

</form>

</html>

i just cant figure out where i am doing wrong. I have saved the mmenudom.js, mmenuns4.js, milonic_src.js and menu_data.js files in the resouces folder of the project.

freshernewbie at 2007-7-6 15:22:52 > top of Java-index,Development Tools,Java Tools...
# 15

The generated HTML is valid. Two questions:

1) If you look @ the Javascript console in your browser - are there any errors or warnings, i.e. does the script your are including execute properly? To open the JS console in Firefox go to Tools->JavaScript Console.

2) You are including menu_data.js after the mmenuns4.js and mmenudom.js. I guess this script contains the actual menu structure and hence should be included before the menu creation scripts. Can you try this?

KSorokina at 2007-7-21 15:04:06 > top of Java-index,Development Tools,Java Tools...
# 16
thank u...it is working now.
fresher-newbiea at 2007-7-21 15:04:06 > top of Java-index,Development Tools,Java Tools...
# 17

i have same problem.... with the follow code :

<?xml version="1.0"?>

<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">

<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>

<f:view>

<ui:page binding="#{Page1.page1}" id="page1">

<ui:html binding="#{Page1.html1}" id="html1">

<ui:head binding="#{Page1.head1}" id="head1">

<ui:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>

</ui:head>

<ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">

<ui:form binding="#{Page1.form1}" id="form1">

<script src="milonic_src.js" type="text/javascript"><![CDATA[

]]></script>

<noscript>

<a href="http://www.milonic.com/">JavaScript Menus and

DHTML Menus Powered by Milonic</a>

</noscript>

<script type="text/javascript"><![CDATA[

if(ns4)_d.write("><scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");

else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");

]]></script>

<script src="menu_data.js" type="text/javascript"><![CDATA[

]]></script>

</ui:form>

</ui:body>

</ui:html>

</ui:page>

</f:view>

</jsp:root>

... and i copied the 4 files .js into resources folder in the "projects" view but when deploy and after run i see only blank page.

Anyone please help me!!

Thanks

mirianoea at 2007-7-21 15:04:06 > top of Java-index,Development Tools,Java Tools...