• 0

Need help with forms.


Question

I'm fluent in HTMl although not with this part.

I'm making a custom home page and at the top of the home page is a search box. What I would like to do is have it so there is a text box, drop down box and a search button. (I have all three already.) When you select an item in the drop down box that is where it will search. I have no idea how to implement this. I know how to get it to search one site but not how to get it to search the selected site. :(

Link to comment
https://www.neowin.net/forum/topic/159891-need-help-with-forms/
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Well the page that it posts it's data too will need to decide what site it searches.

Either via a procedure\function or by If...Then or Select...Case argument.

e.g

if request.form("NameOfTheSelectBox"google.com" then

'do stuff to search google

elseif request.form("NameOfTheSelectBox"dogpile.com" then

'do stuff to search dogpile.com

end if

Or something?

good luck

b :)

  • 0

I'm trying to get this done in HTML.

Sites I want to search on the fly are: Amazon.com, Google.com, Google.com Imges, Download.com. I might add more if needed. It would be great to learn how now and apply those to future forms. I don't know what terms to search for to find a tutorial or know any sites that have the same. (Drop down for multiple sites) or I would try it myself.

  • 0

Maybe you can use javascript to change the action of the form or the method if neccessary to reflect that of the chosen search engine. Like google

<html>
<head>
<script type="text/javascript">
function searchengine(){
 ?if (document.form.engine.value == "google"){
 ? ?document.form.method = "get"
 ? ?document.form.action = "http://www.google.com/q"
 ?}
}
</script>
</head>
<body>
<form name="form" method="get" action="http://watever.com">rch for: <input type="text" name="query">
<br>Search Engine: <select name="engine" onchange="searchengine()">
<option value="xyz">XYZ</option>
<option value="google">Google</option>
</select>
</form>
</body>
</html>

or something similar.. Try it.. Haven't tested the above code myself eith:p... :p but it should work.

  • 0

Thanks for telling me to use Javascript. I found this and used it:

http://javascript.internet.com/forms/multi...rch-engine.html

It came with a few more so right now I can search; Google.com; Archive.com; Dictionary.com; Download.com; eBay.com; HowStuffWorks.com; Google Images; Thesaurus.

Now I need to find out how to search Amazon and i'm set. :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • But you don't own a licence. You are essentially renting it and give it back when they decided to revoke it.
    • All set as AI did the trick
    • NOPE! Too expensive still.
    • AnyDesk 9.5.7 by Razvan Serea AnyDesk is a fast remote desktop system and enables users to access their data, images, videos and applications from anywhere and at any time, and also to share it with others. AnyDesk is the first remote desktop software that doesn't require you to think about what you can do. CAD, video editing or simply working comfortably with an office suite for hours are just a few examples. AnyDesk is designed for modern multi-core CPUs. Most of AnyDesk's image processing is done con­currently. This way, AnyDesk can utilize up to 90% of modern CPUs. AnyDesk works across multiple platforms and operating systems: Windows, Linux, Free BSD, Mac OS, iOS and Android. Just five megabytes - downloaded in a glimpse, sent via email, or fired up from your USB drive, AnyDesk will turn any desktop into your desktop in se­conds. No administrative privileges or installation needed. AnyDesk 9.5.7 changelog: Fixed Bugs Fixed deadlock when updating chat server Fixed crashes caused by exceptions in internal communication layer Fixed crash when opening new monitor in Session in a new window Fixed crash on shutdown Fixed bug that allowed naming Permission Profiles identical to predefined Profiles Fixed bug that could cause licensed remote clients to show up as free Fixed visual bug that caused Set-Password button to show up when Unattended Access was disabled Fixed bug that lead to selecting the wrong initial resolution for webcams New Features Added command line option --record-screen to start a Screen Recording Other Changes Improved visual consistency in some list views Download: AnyDesk 9.5.7 | macOS ~14.0 MB (Free for private use, paid upgrade available) Links: AnyDesk Home Page | Other platforms | Release History | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • WUT?! Tell us you've never built desktop software without telling us you've never built desktop software... The chromium rendering engine is the content-rendering engine for "chromium-based browsers," but that does NOT mean there's a full-on UI underneath that is somehow bloating these products. The bloat is from the additional UI components that the browser vendor (Vivaldi) is adding atop the base package. Most chromium browsers customize the default skin/theme of the overall package so there's absolutely zero added overhead; it's really just a different CSS-based theme pack. Vivaldi, however, adds more than just a different skin; they add built-in extensions (that are managed by other built-in extensions), add other customization modules, and all kinds of other bloat -- and these add-ons are EXACTLY where the resource-hogging stems from. The mere fact it's a chromium-based browser has no impact on the matter. Lastly, power users literally DO notice resource-intensive applications -- they'll even be familiar with tools and widgets that expose those measurements the way only a power-user would! General consumers, however, would simply remark that their rig is sluggish and probably outdated and blindly upgrade to whatever the salespeople are hawking at the local computer store. General consumers wouldn't even upgrade their existing computer cuz they wouldn't know how to!
  • Recent Achievements

    • First Post
      Celilo earned a badge
      First Post
    • One Year In
      K.I.S.S. earned a badge
      One Year In
    • Week One Done
      solidox earned a badge
      Week One Done
    • Dedicated
      solidox earned a badge
      Dedicated
    • Week One Done
      Devesh Beri earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      444
    2. 2
      ATLien_0
      166
    3. 3
      +FloatingFatMan
      151
    4. 4
      Nick H.
      66
    5. 5
      macoman
      63
  • Tell a friend

    Love Neowin? Tell a friend!