File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Context sesitive Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Context sesitive Help" Watch "Context sesitive Help" New topic

Context sesitive Help

Anant Rao
Ranch Hand

Joined: Nov 12, 2004
Posts: 126

our application is built on struts frame work. We have common menu with help as one of the menu field. When Help is clicked it should open the help page (written in html) which contains that respestive file contents.

Can anybody help me how to write help in java or provide
any sample code

Thanks in advace
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

This is a Struts question, yes -- so why not post it in the Struts forum? I will move it there for you.

[Jess in Action][AskingGoodQuestions]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
There's no magic or rocket science involved in writing help text. Just write the text and convert it to html. Microsoft Word or most any modern word processr will do this. Then on each page, put a link to that portion of the html document that pertains to the current page. If you specify target="_blank" on the link, the help text will open in a new window, rather that overwriting the current window. If you want to control the size and position of the help window, you can use the javaScript method.

Consultant, Sima Solutions
Anant Rao
Ranch Hand

Joined: Nov 12, 2004
Posts: 126
Thanks for the reply. But...

I am using a common menu at the navigational bar with Help as Hyperlink. The help files (html pages) are also created.

Now the problem if i am at ProjectDescription page and click at Help it should display me help page related to the ProjectDescription. I am using a Dtree with folders and subfolders.
If I test it independentely i use an url

For the Help Hyperlink I have used a JavaScript"http://"+"<%=request.getServerName()%>"+":"+"<%=request.getServerPort()%>"+"/SampleStaticWeb" );

so, How can I pass an id or some value to the url so that it display that particular page.

I agree. Here's the link:
subject: Context sesitive Help
It's not a secret anymore!