Search html file and open it in same web page

raindrop
Lounger
Posts: 36
Joined: 04 Feb 2013, 06:22

Search html file and open it in same web page

Post by raindrop »

Hi,
I Have One Text Input Box and One Search button On My Web Page For My Offline Project. I Want Java Or Any Script To Find Only HTML File From Specified Folder Located In Drive C: And After Search That File Should Be Opened Automatic In Same Web Page- Work For Offline. Herewith I Attach A Sample File Image And HTML Code Mentioned Below. Can Anybody Help Me?
Search Box.png

Code: Select all

<html>
<head>
<title>Search Box Example 1</title>
<!-- CSS styles for standard search box -->
<style type="text/css">
	#tfheader{
		background-color:#c3dfef;
	}
	#tfnewsearch{
		float:right;
		padding:20px;
	}
	.tftextinput{
		margin: 0;
		padding: 5px 15px;
		font-family: Arial, Helvetica, sans-serif;
		font-size:14px;
		border:1px solid #0076a3; border-right:0px;
		border-top-left-radius: 5px 5px;
		border-bottom-left-radius: 5px 5px;
	}
	.tfbutton {
		margin: 0;
		padding: 5px 15px;
		font-family: Arial, Helvetica, sans-serif;
		font-size:14px;
		outline: none;
		cursor: pointer;
		text-align: center;
		text-decoration: none;
		color: #ffffff;
		border: solid 1px #0076a3; border-right:0px;
		background: #0095cd;
		background: -webkit-gradient(linear, left top, left bottom, from(#00adee), to(#0078a5));
		background: -moz-linear-gradient(top,  #00adee,  #0078a5);
		border-top-right-radius: 5px 5px;
		border-bottom-right-radius: 5px 5px;
	}
	.tfbutton:hover {
		text-decoration: none;
		background: #007ead;
		background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e));
		background: -moz-linear-gradient(top,  #0095cc,  #00678e);
	}
	/* Fixes submit button height problem in Firefox */
	.tfbutton::-moz-focus-inner {
	  border: 0;
	}
	.tfclear{
		clear:both;
	}
</style>
</head>
<body>
	<!-- HTML for SEARCH BAR -->
	<div id="tfheader">
		<form id="tfnewsearch" method="get" action="#">
		        <input type="text" class="tftextinput" name="q" size="21" maxlength="120"><input type="submit" value="search" class="tfbutton">
		</form>
	<div class="tfclear"></div>
	</div>
</body>
</html>
Thanks
Raindrop
You do not have the required permissions to view the files attached to this post.
Last edited by HansV on 01 Nov 2013, 11:38, edited 1 time in total.
Reason: to add [code]...[/code] tags around long HTML code

User avatar
HansV
Administrator
Posts: 74162
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Search html file and open it in same web page

Post by HansV »

Sorry, apparently we don't have enough experts in web page design...
Regards,
Hans