Jump to content

Custom search box to search for stock symbols?


kazyn

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!

Archived

This topic is now archived and is closed to further replies.

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