Solved

link a href in the same home page in html

Posted on 2010-11-11
11
507 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

803 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