Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2007, 04:38 PM
Registered User
 
Join Date: Nov 2007
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.
 
Old December 1st, 2007, 10:30 AM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zhuchunlai
Default

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" />
</frameset>

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>

 
Old December 1st, 2007, 03:54 PM
Registered User
 
Join Date: Nov 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the response.

Could this be done using table instead of frame, because my boss discourages me from using frame?
 
Old December 3rd, 2007, 11:35 PM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

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





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





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