/    Sign up×
Community /Pin to ProfileBookmark

Drop Down Change Form Action – Multiple Search Engines

Hello,

I need a cross-browser, server-side, non-javascript dependent solution for using the select tag to facilitate switching between search engines.

I’ve created & populated several different Google Custom Engines and need to enable a select (dropdown) form to search each one as wanted.

Here’s a working form for one of the engines:

[CODE]<form name=”form1″ action=”/search_results1.php” id=”searchbox_000728331164281115855:5ctdneheiqs” onSubmit=”return checkform(this);”>
<input type=”hidden” name=”cx” value=”000728331164281115855:5ctdneheiqs”>
<input type=”hidden” name=”cof” value=”FORID:11″>
<select name=”as_qdr” class=”selecttime”>
<option value=”all”>anytime</option>
<option value=”d”>past 24 hours</option>
<option value=”w”>past week</option>
<option value=”m”>past month</option>
<option value=”y”>past year</option>
</select><input class=”input” type=”text” name=”q” size=”38″ value=””>
<input type=”image” name=”sa” src=”images/0044.gif” class=”imgbtn”>
</form>[/CODE]

The above code has several common attributes (3 of them unique) shared by the other engines:

1) each has a unique results page (eg the action=)

2) the id=”searchbox_000728331164281115855:5ctdneheiqs”

3) the name “cx” with a value=”000728331164281115855:5ctdneheiqs”

4) <input type=”hidden” name=”cof” value=”FORID:11″>

There are three unique, defining attributes for each individual search form – the action, cx value and the searchbox id are different for each engine.

1) the URL of the results page(s)

2) the <input type=”hidden” name=”cx” value=”000728331164281115855:5ctdneheiqs”>

3) id=”searchbox_000728331164281115855:5ctdneheiqs”

Any help would be most appreciated; I’ve been all over the Web including Google’s CSE groups, etc. for weeks to no avail.

# # #

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Notepad spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...