Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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 July 21st, 2010, 02:49 PM
Authorized User
 
Join Date: Oct 2009
Posts: 14
Thanks: 5
Thanked 2 Times in 2 Posts
Default Search box showing results in same window

I have a search box I'm using that returns the results in a different tab. How can I code this to open in the same tab/window?
Code:
<p>&nbsp;</p>
<form id="searchForm" action="http://vufind.carli.illinois.edu/vf-sic/Search/Home" method="get" name="searchForm" target="vufind">
	<fieldset><b>Search for DVDs and Videos: </b>
		<input name="start_over" value="1" type="hidden">
                <input id="lookfor[]" name="lookfor" size="10" type="text">
                <input name="format[]" value="Film / Video" type="hidden">
               	<input name="submit" value="Find" type="submit">
                <input name="search" value="new" type="hidden">
        </fieldset>
</form>
<p>&nbsp;</p>
This produces the desired results, I just need them to post in the same window/tab...in other words, to replace the page that the search box is on....does that make sense??
The Following User Says Thank You to mitch54 For This Useful Post:
 
Old July 21st, 2010, 04:24 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Just take out the target attribute from the <form /> element....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
 
Old July 21st, 2010, 04:25 PM
Authorized User
 
Join Date: Oct 2009
Posts: 14
Thanks: 5
Thanked 2 Times in 2 Posts
Default

What if I change the target to "_self"....will that work?
The Following User Says Thank You to mitch54 For This Useful Post:
 
Old July 21st, 2010, 04:27 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

a) Why don't you try it out?

b) Why would you. No target means by default "submit to self"

Hope this helps

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
mitch54 (July 22nd, 2010)
 
Old July 21st, 2010, 04:28 PM
Authorized User
 
Join Date: Oct 2009
Posts: 14
Thanks: 5
Thanked 2 Times in 2 Posts
Default

OK....I'm pretty new to web sites and I have been assigned to assist on this one for the library.
 
Old July 22nd, 2010, 09:04 AM
Authorized User
 
Join Date: Oct 2009
Posts: 14
Thanks: 5
Thanked 2 Times in 2 Posts
Default

That worked....thanks. I didn't even THINK of the target attribute....because sometimes I'm an airhead.....THANKS!!
 
Old June 1st, 2011, 07:12 AM
Registered User
 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,guy.I have been engaged in SEO for about 5 years. Now i need a partener to help me to structure website for my customers.I will pay you for each task you completes .If you are interested in it ,please contact me . e-mail:[email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Search box on a Database results page meichmann ASP.NET 2.0 Basics 3 April 2nd, 2008 10:25 AM
Stop VBE Window Showing Skunk Excel VBA 0 December 31st, 2004 05:26 AM
showing a popup window on click widad Classic ASP Basics 4 October 15th, 2004 09:50 AM
Added new search field & showing no results?? jdavis7453 Classic ASP Databases 0 September 16th, 2004 05:05 PM





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