Jump to content

Plz Need Help With My Html Web Search Form


Recommended Posts

Hi i am not as advanced as most peoples here and trying to do a html web search form. Id really appreciate if someone could write me the html codes and explain it in detail, so i can in the future make some modification.

 

Here is my codes:

<P align=center>
<TABLE border=1 cellSpacing=2 cellPadding=1 width=400
background="MyImageDirectory/MyImageBackground.jpg" height=200>
 <TBODY>
 <TR>
<TD align=center>
  <P><INPUT id=textzone name=textzone placeholder="Put your text here"></P>
  <P><SELECT><OPTION selected value=1>Google Search</OPTION><OPTION
	value=2>Yahoo Search</OPTION><OPTION value=3>Bing Search</OPTION><OPTION
	value=4>Excite Search</OPTION><OPTION value=5>Webcrawler
	Search</OPTION><OPTION value=6>Infospace Search</OPTION><OPTION
	value=7>Ask Search</OPTION><OPTION value=8>Aol Search</OPTION><OPTION
	value=9>Youtube Search</OPTION><OPTION value=10>Vanbasco
  Karaoke</OPTION></SELECT></P>
  <P><INPUT type=radio name=Radio1>WEB<INPUT type=radio
  name=Radio2>IMG.<INPUT type=radio name=Radio3>VID.</P>
  <P><INPUT value="Submit Query" type=submit></P></TD></TR></TBODY></TABLE></P>

 

The idea is that a user simply enter his text, after choose one of the options (Google search / Yahoo search / etc); after that choose one radio button (making only one radio button at a time selectable) then the user click on the button (Submit Query). It open a new window "_blank" with the search.

 

Example:

A user write his text, choose Google Search, select the radio button Web; after click on the Submit button. It then open "_blank" Google webpage with the search like: http://www.google.com/search?q=

 

If the user choose Google Search and the radio button Image (Img) it then open a new window and show the Google image results.

 

It would really appreciate that you could give me the html codes to do so, and as said do some explications; so i can do future modifications.

 

Thank's for your time.

Link to comment
Share on other sites

What you want to do can't be done with simple html if this is what your wanting to do:

 

http://bybyron.net/tools/image-search.php

 

(Somebody correct me if I'm wrong, it's been awhile since I've worked with ONLY HTML forms.)

 

You'll need some other type of scripting like javascript or php. You'll first need to understand url query strings:

 

http://perishablepress.com/how-to-write-valid-url-query-string-parameters/

 

For example, if you go to google image search and do a search for cats, check your address bar for the url. You'll see all kinds of parameters.

 

https://www.google.com/search?safe=off&hl=en&site=imghp&tbm=isch&source=hp&biw=1517&bih=756&q=cats&oq=cats&gs_l=img.1.0.0l10.1333.2106.0.5863.4.4.0.0.0.0.96.372.4.4.0.msedr...0...1ac.1.61.img..0.4.370.UWgHMUqwJrI

 

A shorter version will actually work:

 

https://www.google.com/search?safe=off&hl=en&site=imghp&tbm=isch&source=hp&biw=1517&bih=756&q=cats&oq=cats

 

Here's a couple of tools I made several years ago with php. They're really outdated but you'll get the idea maybe. Just look at the header codes.

 

header("location:http://google.com/search?hl=en&ie=ISO-8859-1&q=$q");

 

That's where the work is done.

 

http://bybyron.net/tools/multi-search.txt

 

http://bybyron.net/tools/multi-search.php

Link to comment
Share on other sites

Thank's Byron. I have tryed to figure it out and it is still hard for my self to figure out. So i attach a zip file containing two folder. One called: mylook (wich is an look example), the other called: myexperiment (wich will make you realise i have tryed to work it out) with your examples. Still need some help, or even better some finished zip file of my look that work, with some readme that explain like where to put the files. Like the php and txt file in same directory; or others.

 

The goal is to simply, that i create a page, and into the page i simply put my "Tab Search Rectangle" where i want. An example would be that i replace the old flash search rectangle on my personnal website (for making you a better visual idea) by the other.

 

The thing is that i hope that it is light weight. I dont want to slow down the heliohost server, or that the search box cause some problems?? That's why it should be good to have the result here in a zip with a readme that i can download that you or someone trust worthy could make for me.

 

Thank's for the help! A+

 

Ive forgot to mention that when the button of the form is clicked it open a "_blank". Like a user enter the text, choose google; click the button. The result show in a new page of the selected search engine. A+

testing01.zip

Link to comment
Share on other sites

Thank's Byron very much!

 

This is what i have done:

http://sylvain.helio...search/test.php

 

The only thing i try to figure out is how when the user click the submit button the search go into a new page as "_blank"??

 

I have tryed to change the: ( $q ) as ( ....... $q target="_blank"); exit;

Even tryed to replace the (exit) by target="_blank". It give me some error message

 

I wonder how this could be done? I know i feel silly right now loll, but at leass i try to understand and to make it work my tab section (rectangle zone). So i could put this zone where i want in a page.

 

Thank's for the help! A+

Link to comment
Share on other sites

Thank's Yashrs, the "_blank" into (form) work as wanted.

 

Thank's also Byron very much without your codes, i could have never figure it out.

 

Most times, i find free file examples to do things and to know how to do things; and try to figure out.

 

Also in the customer service forum. I have writen a subject called avg threat, and one of the moderators have suggested me, fiew things. As take out the qrcode and other things. So i think to make a hole new design with my soft that i have buyed some time ago, called: Artisteer. Still have my receipt number. It's a great soft and easy. You just put some pages, choose some options, click on a button of suggestions. And it create all sort of design look fast.

 

The search box, is because some peoples have told my self that it's not every one that have the flash player into there browser to make a search; as on some tablet and other devices.

 

So i thank you not only for my personnal website, but also for my friends that i know use fiew times my personnal website and make it know to others. Want to say also, even if the new year is already there; happy new year to all and your loved ones.

 

I dont know if the moderator that ive spoken, have mention to the others high rank placed heliohost members; a section called Full Free Legal Soft. Just to help peoples, and to share with others; a simple suggestion of mine. But as said, must be about images, pages; well related to websites. So it would not go out of the way and should respect also.

 

Once again thank's to all!

Link to comment
Share on other sites

I tryed to advance the search box, by simply putting two more button. To explain it i have changed the button called "Submit Search" change it to "Web". After beside put an other button with the text "Img." Next to it an other button with the text "Vid."

 

After that i tryed to simply copy all the code from: <?php.... to the code of ..... ?>

Then i have paste it twice and tryed a change. Where it is writen: if ( $_GET[submited] )

I tryed for the other two buttons to change it to: if ( $_GET[submited02] ) and to.... if ( $_GET[submited03] )

 

Then my logic was that to call the first button: "submited", my second button "submited02" and the third with the name of "submited03"

 

When i clicked on the first button it worked, but when i clicked on the second button and third; they had some kind of message that the code from <?php..... to the code of ..... ?> cant be repeated in the same page. I have think it could be possible, so when a user click on the button "Web" it does a web search. The button "Img." it do an image search, and "Vid." it does a video search. For some options i would put it the same. Like when a user choose Youtube Search, what ever button it click it does the same.

 

So i wonder if it is possible to do so. A good example is by going on my personnal website and going in my search section; and trying the flash search box that ive find on the web and modified long time ago. It will make you realize the idea to put 3 submit button. How to make it and what's the codes?

 

If it's not possible, then in time i'll just have to make an other php page and simply change the url. So 3 pages, one for the web search, one for the image search; and one for the video search.

 

Thank's for your time.

Link to comment
Share on other sites

Thank's again, i have completed the search example at: http://sylvain.helio...search/test.php

 

I also have changed the form size and look, everything work just fine. Ive mentionet to some peoples that i know, and they said: work great. When some have seen the look, have said why give your thank's into it? Simply because it's important for my self, to tell to my surrounding how much i appreciate them. As said on each pages thank's to heliohost.

 

Id like to ask some special favor, is that each of you who see this message and share this message; to simply tell to your surrounding. To the peoples you know whether it's your family, friends; to tell them that you appreciate them, care for them and love them. At leass once a month. There are so much peoples in the world that dont say to there relatives how important they are and how they love them. Me i say it to my dad my mother and others that i'm glad they are part of my life and how much i love them. I know that in life you never know when some peoples gonna die, not wishing and wanting bad things to any one. So for me, please tell to your relatives that you are glad they are part of your life and what your heart tell you.

 

Once again thank's for your help!

 

Sincerely, Sylvain. A+

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...