Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 30th, 2007, 04:38 PM
Registered User
Join Date: Nov 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Display Search Engine result in table using JSP

Hi. I have a JSP with two columns in a table. The left column lists the URLs, such as www.google.com and www.yahoo.com . The right column supposes to display the result if one of the URLs on the left column is clicked.
Right now, when I click a URL, a new page is displayed showing the result, instead showing the result on the right column.
Please help.
If you have snippet of code, I appreciate if you could post it.
Reply With Quote
  #2 (permalink)  
Old December 1st, 2007, 10:30 AM
Registered User
Join Date: Nov 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zhuchunlai

You can try it with frameset. The whole page is divided into two parties. The left part is used for show your left column. The other for your right column.But you should use two jsp or html files for each one.

some codes as follows:

<frameset rows="*" cols="205,*" framespacing="0" frameborder="no" border="0">
  <frame src="navigation.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" />
  <frame src="mainFrame.html" name="mainFrame" id="mainFrame" />

some code fo navigation.html as follows:

<p>1¡¢<a href="http://www.google.com" target="mainFrame">www.google.com</a></p>
<p>2¡¢<a href = "http://www.baidu.com" target = "mainFrame">www.baidu.com</a></p>

Reply With Quote
  #3 (permalink)  
Old December 1st, 2007, 03:54 PM
Registered User
Join Date: Nov 2007
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for the response.

Could this be done using table instead of frame, because my boss discourages me from using frame?
Reply With Quote
  #4 (permalink)  
Old December 3rd, 2007, 11:35 PM
Friend of Wrox
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

Try using IFrames!
Use table to have two columns, left with hyper links and the right column will have the iFrame with a specific id value. The hyper links href attribute will call a java script method instead of having link in it. Write a java script method to change the src attribute of the iFrame when user clicks on the hyper link.

- Rakesh
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Result batott ASP.NET 2.0 Professional 1 June 5th, 2008 08:39 AM
Search Engine? iPagan BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 April 4th, 2007 05:14 AM
Search Engine for Full-text Search Kala ASP.NET 1.0 and 1.1 Professional 2 August 29th, 2004 02:16 AM
Search engine that search through local drive! wenzation Classic ASP Basics 0 August 26th, 2003 09:15 PM

All times are GMT -4. The time now is 08:50 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.