Novell Home

Followup: Creating an eGuide Search Box

Novell Cool Solutions: Tip
By Peter Wass

Digg This - Slashdot This

Updated: 6 Apr 2005
 

A reader raised the following question about our recent article "Searching eGuide from Another Page" (http://www.novell.com/coolsolutions/tip/11883.html) ...

"I would like to know how to set up the search box on the intranet site. How do I pass the search-string to eGuide?"

And here's the answer from article author Peter Wass:


It's easy enough. The search string is the same as any search within eGuide, with the 'Action=' replaced with 'EXTAction='.

The form would look something like this:

<form name="eGuidesearch" method="post"
action="http://<host>/eGuide/servlet/eGuide">;
 <input name="val1">
 <input name="val2">
 <input type=hidden name="Directory.uid" value="your_directory">
 <input type=hidden name="Object.uid" value="USER">
 <input type=hidden name="attr1" value="LASTNAME">
 <input type=hidden name="crit1" value="co">
 <input type=hidden name="aoval1" value="or">
 <input type=hidden name="attr2" value="GIVENNAME">
<input type=hidden name="crit2" value="co">
 <input type=hidden name="EXTAction" value="list.get">
</form>

You can play with the settings as much as you like, adding or removing parameters. For instance, you can change the hidden attr1 and attr2 to checkboxes if you don't want to search both of them, etc. The documentation on eGuide has the parameters you'll need to build a valid string.

That should produce a string something like this:

<host>/eGuide/servlet/eGuide?ExtAction=List.get&val1=<parameter>&val2=<p
arameter2>&Directory.uid=... 

which, when passed to eGuide through the JavaScript, submits the following string:

<host>/eGuide/servlet/eGuide?Action=List.get&val1=<parameter>&val2=<para
meter2>&Directory.uid=... 

Alternatively, you can just copy the form out of the HTML on eGuide and change the Action.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell