Changing yubnub's default from google to anything else problem...

16 views
Skip to first unread message

Eric

unread,
Mar 5, 2012, 8:12:07 PM3/5/12
to YubNub
Hi,

I did find this old post over on the wiki, but....
-----
Friday, July 20, 2007
YubNub "default" parameter for overriding default command (Google)
If you don't want Google as the default YubNub command, here's how you
can override it:

http://yubnub.org/parser/parse?default=y&command=abcde

In this example, we set the default to the "y" command (Yahoo).

posted by Jonathan at 7/20/2007 08:38:00 PM 0 comments
----

it doesn't solve my problem. :(

I made a search page to my liking, loads in new tabs, with an embedded
yubnub search form.

I'd love to swap the default search to duckduckgo (ddg), but I can't
even get his example to make it default to yahoo, as he describes...

Any help would be greatly appreciated.
Here's the script from the head (irrelevant?), and then the form from
the body:
----
<script type="text/javascript">
function focus(){document.input_box.command.focus();}
function prepend(arg){
oldVal = document.input_box.command.value;
document.input_box.command.value = arg + oldVal;
focus();
}
</script>
---
<form action="http://yubnub.org/parser/parse?default=y&command=abcde"
method="get" name="input_box">
<input type="text" name="command" size="45" value=""
class="searchbox" />

<div class="divbox">
<input type="reset" class="button1a" value="clear">
<input type="submit" class="button1b" value="send">
</div>

<div class="divbox">
<input type="button" class="button2" onclick="prepend('ddg ')"
value="ddg">
<input type="button" class="button2" onclick="prepend('!gi ')"
value="ddg img">
<input type="button" class="button2" onclick="prepend('wp ')"
value="wp">
<br />
<input type="button" class="button2" onclick="prepend('g ')"
value="g">
<input type="button" class="button2" onclick="prepend('gmaps ')"
value="maps">
<input type="button" class="button2" onclick="prepend('imdb ')"
value="imdb">
</div>
</form>
----
Shouldn't the form action default line drive the destination even with
this whole thing external to yubnub? It doesn't - it returns google no
matter what....

Thanks in advance,
Eric

Jonathan Aquino

unread,
Mar 5, 2012, 9:46:16 PM3/5/12
to yub...@googlegroups.com
Hi Eric,

Try putting this inside your form:

<input type="hidden" name="default" value="y" />

Hopefully that will work.

Jonathan



--
You received this message because you are subscribed to the Google Groups "YubNub" group.
To post to this group, send email to yub...@googlegroups.com.
To unsubscribe from this group, send email to yubnub+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/yubnub?hl=en.


Eric

unread,
Mar 6, 2012, 3:53:30 AM3/6/12
to YubNub
Yes! Works perfectly. I really appreciate it.
Thanks so much Jonathan, for YubNub, and for the help.

- Eric
Reply all
Reply to author
Forward
0 new messages