G'day
I'm looking for a script that can search multiple instances of Google
(or other search engines optionally). The user types in a single word
in the text field, presses ENTER or the submit button, and the browser
launches several instances of Google with the single word + other
search terms.
I would like to have this script because I'm a translator and
frequently need to look up the meaning of words. I Google using
combinations like searchterm+glos sary, searchterm+term s,
searchterm+glos sary+site:.coun trycode (for country specific usage)
etc.
The way I see it, basically the script should take the user's word and
concatenate it with the prefix "http://www.google.com/search?q=" and
the suffix "+glossary&num= 100", and then launch a window with that
URL. I managed to adapt a simple password URL script to do this, but
it only launches one instance of Google. I'd like to launch several
windows each with a different combination.
Searches for phrases can take the prefix
"http://www.google.com/search?q=%22" and the suffix
"%22+glossary&n um=100", on a seperate section of the page meant for
phrase searches.
It would be nice if the script can automatically determine in the case
of single words that the words entered by the user needs to be
concatenated with "+" inbetween, but this is entirely optional. An
alternative method to allow the user to search more than one word is
to simply have a form with a number of text boxes. Since Google
ignores extra plusses in the search URL (a search for
searchterm+sear chterm will yield the same result as
searchterm+++++ searchterm or searchterm+++se archterm++), it won't
break the script if some of the boxes are left empty.
Does such a script exist, or if not, can anyone please write me one?
Thanks in advance.
Voetleuce 3 1897
Voetleuce en f?nsievry said: G'day
I'm looking for a script that can search multiple instances of Google
<html>
<head>
<script type="text/javascript">
function go(f){
var count=0;
var prefix="http://www.google.com/search?q="+f.q. value.replace(/\s+/g,"+");
for(var i=0;i<f.opt.len gth;i++){
if(f.opt[i].checked){
var search=prefix+" +"+f.opt[i].value;
if(f.opt[i].value=="site:" ){
search+=f.site. value;
}
count++;
window.open(sea rch,
("window"+Math. random()).repla ce(/\./,""),
"top="+(50*coun t)+",left="+(50 *count)
);
}
}
if(!count){ // nothing checked
window.open(pre fix,("window"+M ath.random()).r eplace(/\./,""));
}
}
</script>
</head>
<body>
<form>
<table>
<tr>
<td align="right">
Search for:
</td>
<td>
<input name="q">
<input type="button" value="Go" onclick="go(thi s.form)">
</td>
</tr>
<tr>
<td align="right">
With:
</td>
<td>
<input type="checkbox" name="opt" value="terms">t erms
<input type="checkbox" name="opt" value="glossary ">glossary
<input type="checkbox" name="opt" value="site:">s ite:<input name="site">
</td>
</tr>
</table>
</form>
</body>
</html>
Lee <RE************ **@cox.net> wrote in message news:<br******* *@drn.newsguy.c om>... Voetleuce en f?nsievry said:
G'day
I'm looking for a script that can search multiple instances of Google
<html> <head> <script type="text/javascript"> function go(f){ var count=0; var prefix="http://www.google.com/search?q="+f.q. value.replace(/\s+/g,"+"); for(var i=0;i<f.opt.len gth;i++){ if(f.opt[i].checked){ var search=prefix+" +"+f.opt[i].value; if(f.opt[i].value=="site:" ){ search+=f.site. value; } count++; window.open(sea rch, ("window"+Math. random()).repla ce(/\./,""), "top="+(50*coun t)+",left="+(50 *count) ); } } if(!count){ // nothing checked window.open(pre fix,("window"+M ath.random()).r eplace(/\./,"")); } } </script> </head> <body> <form> <table> <tr> <td align="right"> Search for: </td> <td> <input name="q"> <input type="button" value="Go" onclick="go(thi s.form)"> </td> </tr> <tr> <td align="right"> With: </td> <td> <input type="checkbox" name="opt" value="terms">t erms <input type="checkbox" name="opt" value="glossary ">glossary <input type="checkbox" name="opt" value="site:">s ite:<input name="site"> </td> </tr> </table> </form> </body> </html>
Thanks a lot! This does exactly what I needed. I have one question,
though, if you don't mind: I'd like the windows to open full screen
with scrollbars (with or without address field, that's optional). I
managed to get full screen by changing
window.open(sea rch,
("window"+Math. random()).repla ce(/\./,""),
"top="+(50*coun t)+",left="+(50 *count)
);
to
window.open(sea rch);
but I could not figure out how to enable the scroll bars. The only
scripts or information I could find on the web deal with *removing*
them, heh-heh.
Thanks again.
Voetleuce en f?nsievry said: Thanks a lot! This does exactly what I needed. I have one question, though, if you don't mind: I'd like the windows to open full screen with scrollbars (with or without address field, that's optional). I managed to get full screen by changing
window.open(se arch, ("window"+Math. random()).repla ce(/\./,""), "top="+(50*coun t)+",left="+(50 *count) );
to
window.open(se arch);
but I could not figure out how to enable the scroll bars. The only scripts or information I could find on the web deal with *removing* them, heh-heh.
Your solution should provide scrollbars if the browser detects that
the content is larger than the window.
When you specify any window attribute, any that you don't specify
default to "off" instead of "on", so if you want to specify that
scrollbars are to appear, you also have to list all of the other
window attributes that you want:
window.open(sea rch,
"somename",
"toolbar,locati on,directories, status,menubar, scrollbars,resi zable");
where "somename" must be unique if you're opening multiple windows.
That's the reason for the Math.random() business.
If you're not getting scrollbars by default, specifying them might
not create them either, since the browser doesn't think they're needed.
That may depend on which browser you're using. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul Miller |
last post by:
Some background first - we have some software that embeds a Python
interpreter into a host application. Scripts are loaded dynamically and
used. But we want to support the ability to edit scripts while the app is
running. This means we have to "unload" the script and cause a reload.
Normal module reloading tricks don't work because if you try to reimport a
script that imports another script, and if the nested script is changed, it
might...
|
by: David Winter |
last post by:
I'm not a developer myself, but I am looking for something that maybe
one of you guys
- has done
- knows about
- would like to do - yes, I have a small budget for this. :)
The basic idea: A browser-based editor for *static* HTML pages, like
this:
|
by: Matt Ratliff |
last post by:
Hello,
I would appreciate any assistance you have with the following
problem:
I have (as an example) an array of values as follows:
arrayvalues=new Array("0001","0003","0005") where each is the value
of an option in a select statement:
<select id="usertypes" multiple="multiple">
<option value="0033">data1</option>
|
by: Bob Alston |
last post by:
I am looking for others who have built systems to scan documents, index
them and then make them accessible from an Access database. My
environment is a nonprofit with about 20-25 case workers who use
laptops. They have Access databases on their laptops and the data is
replicated.
The idea is that each case worker would scan their own documents,
either remotely or back at the office.
And NO I am not planning to store the scanned...
|
by: c676228 |
last post by:
Hi everyone,
my colleagues are thinking about have three insurance plans on one asp page:
I simplify the plan as follow:
text box:number of people
plan1 plan2 plan3
| |
by: Fantasys |
last post by:
We're seeking undiscovered unappreciated genius.
E-mail me at django@kentuckyescorts.net
Fantasys Enterprises the leader the USA Escort Industry is seeking
developers to form the core of garage development team to help us
create the next generation of Kick ass software for the our Industry.
There are a lot of Escort sites and software out there but none of it
created by those who KNOW this business. Members of the team will be...
|
by: Arnaud |
last post by:
Hello,
I'm looking for a php multiple choice question script...
Seen/tested many but no one with my requirements :
- check boxes (and not only radio buttons)
- show answers (optional)
- compute of the results (optional : store them in a DB)
Until now my best candidate is that one :
|
by: bonneylake |
last post by:
Hey Everyone,
Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also the parts section an i seem to be having trouble.
When i try to insert into the parts section i get the error Invalid character value for cast specification. But not sure what i am doing wrong. Here is what i am using to insert. All the sections...
|
by: bonneylake |
last post by:
Hey Everyone,
Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place.
what i am trying to display previously entered multiple fields. I am able to get my serial fields to display correctly, but i can not display my parts fields correctly.
Currently this is what it does
serial information 1
parts 1
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |