HostKube

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
drop down menu task
11-25-2008, 11:00 AM
Post: #1
drop down menu task
hi all i'm working in jsp & servlet project now i need a help in code for jsp page

I had a drop down menu which is dynamically reloaded from my database records waht i need is to link each item in the that menu to a different page(for each item there is a unique page)

example
i have a menu of course(java , db2 ,etc.....)
if i select java from the menu i want to open the page iclude the discription of that course
Find all posts by this user
Quote this message in a reply
11-25-2008, 04:49 PM
Post: #2
RE: drop down menu task
I have no clue with java (especially concerning websites), i only know javascript but i think what you are after is GET variables.

eg. page.jsp?page=home

So you'd want to add a link with the row id or something in that get variable so you know what description to provide. page.jsp just has the template for the description but the variable is displayed.

If that makes any sense?

*trys to understand java*

Code:
<%
String locationID = request.getParameter( "page" );
if( null != locationID && !locationID.equals( "home" ) )
{
if( locationID.equals( "homePage" ) )
{
put content into a variable.
}
}
%>

ByteForums: Rules | Challenges | PHP Tutorials | Myspace | Youtube
[Image: birdie312.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:

Contact UsByte ForumsReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication