Solved

link a href in the same home page in html

Posted on 2010-11-11
11
511 Views
Last Modified: 2012-08-14
Dear Experts,

I get input box to input my product NO and then link to other URL according to
the input box number, for example, if  type 656 in the input box and  press enter key,
it will redirect to http://www.mywebsite.com/656.htm 
I would like to know could I display 656.htm page into the same page of input box's html?  in other
words, display it right below the input box area because I need to type another new code like 1234 and its
1234.htm page will replace previous one of 656.htm right below the same page of input box.

I don't want to use frameset, because will feel the display not comfortable by the outlook of two frame

Please advise

Thanks

Duncan




0
Comment
Question by:duncanb7
  • 8
  • 2
11 Comments
 
LVL 10

Assisted Solution

by:aboo_s
aboo_s earned 20 total points
ID: 34114034
What you need is iframe
look it up in google "learn html iframe"
0
 
LVL 13

Accepted Solution

by:
duncanb7 earned 0 total points
ID: 34114291
Probably use frameset with  iframe , Right ? no other choices ?

Actually, I will go to search those framset information, but right now, I could not
change the URL from input box's porudction NO, like input number to 65 it
redirect to www.website.com/65.htm. Could help on this first at this thread
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_26608513.html

It should be easy but I fail to my following code

<html>
<body>
<form method="get" action="http://www.mywebsite.com?code?.htm">
 PRODUCT-NO: <input type="text"  name="code" value="">
<input type="submit" value="Submit">
</form>
</body>
</html>
0
 
LVL 13

Author Comment

by:duncanb7
ID: 34114703
The first issue is solved at http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_26608513.html#a34114499

now going to frameset with iframe, Any one could provide me the simple code how
redirect url into second frame if the first frame is input box ?

THanks

Duncan
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 16

Assisted Solution

by:jmatix
jmatix earned 480 total points
ID: 34114720
See this example:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Developer Studio">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<TITLE>Document Title</TITLE>
<script>
function formSubmit(frm)
{
	document.getElementById("frame1").src="http://www.mywebsite.com/"+frm.text1.value+".htm";
	return false;
}

</script>

</HEAD>
<body>
<form onsubmit="return formSubmit(this)">
<input type="text" name="text1"> 
<input type="submit" name="submit"> 
</form>
<iframe width="600" border="0px" id="frame1">
</body>
</HTML>

Open in new window

0
 
LVL 13

Author Comment

by:duncanb7
ID: 34114826
Thanks, imatix, it work finally and I credit it to you 480 point with "A"  already even it is not shown because
the process of "request Attention " of this thread.
0
 
LVL 13

Author Comment

by:duncanb7
ID: 34114967
Dear Imatix,

One more help, could I put default webpage at second frame ?
I mean when first frame open, it will set default webpage in second frame as default

0
 
LVL 13

Author Comment

by:duncanb7
ID: 34114990
it is done just put <input type="text" name="text1" value="6666666">
0
 
LVL 16

Expert Comment

by:jmatix
ID: 34115036
Or you can change the <iframe> to :

<iframe width="600" border="0" id="frame1" src="http://www.mywebsite.com/6666666.htm">
0
 
LVL 13

Author Comment

by:duncanb7
ID: 34115114
thanks it work finally with src=......, I mentioned previously value=66666666 that doesn't work and it is misunderstood
0
 
LVL 13

Author Comment

by:duncanb7
ID: 34115637
Dear Imatix,

Could you help on this with frame scroll bar merge together with IE window scroll bar at
the new thread

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/HTML/Q_26609115.html
0
 
LVL 13

Author Closing Comment

by:duncanb7
ID: 34143489
THanks specially  imatix and others
reply this thread,

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to use question mark (?) in filename with html 25 71
jQuery Scroll To Top 5 37
How to format numbers and letters in nested lists 5 31
on window close, not beforeunload 6 15
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question