Dynamically change the hyperlink based on the keywords
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nrupesh_Soni
Posted On:   Saturday, April 8, 2006 09:32 AM

Hi, I am trying to come up with something like www.turboscout.com but for my own convenience as we have to go through a lot of websites daily to search for info and this would save me a lot of time. Basically , like turboscout.com, I want to search 5 of my sites by putting the info from the textbox into the hyperlinks. What I will have is a page with certain links on it for different sites, for example on the top of the page will be a textbox and below it there will be a few sites like http://www.petco.com/ for example. Now when I put the keywords "puppy food" in the textbox and click on Petco.com , it should go to http://www.petco.com/Shop/SearchResults.aspx?Nav=1&N=0&Ntt=puppy%20food. Hope t   More>>

Hi,

I am trying to come up with something like www.turboscout.com but for my own convenience as we have to go through a lot of websites daily to search for info and this would save me a lot of time.
Basically , like turboscout.com, I want to search 5 of my sites by putting the info from the textbox into the hyperlinks.

What I will have is a page with certain links on it for different sites, for example on the top of the page will be a textbox and below it there will be a few sites like http://www.petco.com/ for example.
Now when I put the keywords "puppy food" in the textbox and click on Petco.com , it should go to http://www.petco.com/Shop/SearchResults.aspx?Nav=1&N=0&Ntt=puppy%20food.

Hope that makes sense

I am quite familiar with HTML but I suck at programming, so any starting tips would be appreciated.... I know this shouldn't be a lot of work and there might be some script already out there, but I looked for a few hours before I am asking here.

Thanks a lot for any help... will be very appreciated!

Regds,

Nrupesh
nrupesh(at)usa.net

   <<Less

Re: Dynamically change the hyperlink based on the keywords

Posted By:   Robert_Lybarger  
Posted On:   Sunday, April 9, 2006 10:43 PM

Instead of trying to change the link location, why not (1) have the text input field like you have, (2) have destination choices in a set of radio buttons, then (3) have a button with an onClick event? I can't write the code for you... you'll have to work the details out for yourself, but you'll likely build a string variable based on the selected radio option and the [urlencode()'ed] value of the text field, then do a window.location() call or something. Consult any of the bajillion javascript tutorial sites out there.

About | Sitemap | Contact