Jump to content

Click a button to open 'custom' URLS


coogie

Recommended Posts

Hello, I have to do repetative search tasks over 3 websites. To make mylife easier (and for the fun of programming this), i'm trying to create the below:

 

[text input box]

link1  (checkbox)

link2  (checkbox)

link3  (checkbox)

[submit button]

 

 

I would like each checkbox to represent a custom URL, which (when checked) will then enter the search 'term' from the input textbox and open the generated URL in a new window. For example

 

my 3 URLS will look like the below. I need to replace the search term ('my search term' in this example) and add the "+" symbol for each word.

 

h.ttp://www.google.com/search?num=100&hl=en&tbs=nws:1,sbd:1&q=my+search+term&aq=f&aqi=&aql=&oq=&gs_rfai=

 

h.ttp://search.ft.com/search?ftsearchType=type_news&sortBy=gadatetimearticle&queryText=my+search+term

 

h.ttp://www.reuters.com/search?blob=my+search+term

 

 

Would anyone have some code snippets in order to get me started? I'm new to Javascript and custom forms, but can 'read' code rather well as I have previous coding experiences.

 

Any help at all would be hugely appreciated!

Link to comment
Share on other sites

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.