0

Hi.
I'm trying to make a simple page that contains a google search form. The results of the search needed to be shown in an iframe that is on the same page. I've managed to write the search form but I can't make the results appear in the iframe. Whenever i click search it just opens the google search page.
What do i miss here?

<html>
<head>
	<title>My Searhpage</title>
</head>
<body>
	<h1 align="center">Google Search</h1>
	<form action="http://www.google.com/search" method="get" enctype="text">
		<input type="text" name="q">
		<input type="submit" value="Search">
	</form>
	<iframe src="https://www.google.com/search?q=" width="800" height="600">
</body>
</html>

Please help.
Thanks in advance =)

4
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by akvilio
0

when i used ur code, google says, that it cannot load the results page in a frame.

Even I tried to add iframe name and use form target to that name.

You can directly login to google and use their readymade codes for your requirement.

0

The trick is to do it myself. i'm in a learning process, wanted to get more experienced opinion and help... but thanks anyway =)

0

Got it, thanks! Anyway, I figured it out with "target" and "name" attributes.

0

No. As sufyan2011 said, google don't allow their result pages be displayed in iframes as a security precaution.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.