Jump to content

Custom search box to search for stock symbols?


Recommended Posts

Hello!

 

I'd like to create a custom search box that will use Yahoo! Finance as its search provider. I want the user to be able to search either a company name or a stock symbol and hit SEARCH and have Yahoo! Finance come up in a separate tab that will show that company's stock information.

 

For example, if I searched GOOG and hit Search, a new tab would appear that would load this page:

 

http://finance.yahoo.com/q?s=goog&ql=1

 

Also, if I searched Google, I would hope that the same page would appear (as it does on Yahoo! Finance).

 

Is this possible? How would I go about it?

 

Thanks!!

A friend explained that I would use something similar to this:

 

<form action=”/cgi-sys/entropysearch.cgi” target=”searchwindow”>
<input name=”query” value=”search” type=”text”>
<input value=”Search” type=”submit”>
</form>

 

But there need to be some changes and I don't really know what to do here.

 

I know that I want to use this URL:

 

http://finance.yahoo.com/q?s=

 

And the search box would append the query so that it would look like this:

 

http://finance.yahoo.com/q?s=GOOG

 

so the query would be whatever they put in the box.

 

How would I edit the above code to make this happen? Looks like I need some sort of .cgi to make the search work? I don't understand.

 

Thanks!

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.