I'm not sure if this has been one before I couldnt
find anything about it in the archive.

I wanted to use FORMAT and METHOD in my header.html but the varibles
supply all the html code for slections and i wanted  just the
previously selected option one without giving the user another choice.

I created 2 new env vbles  SELECTED_FORMAT and SELECTED_METHOD

html reply - eg header.html

<input type=hidden name=format value="$(SELECTED_FORMAT)">
<input type=hidden name=method value="$(SELECTED_METHOD)">


============

Source changes.

very trivial only 2 lines  added to Display.cc to put
the relevant info into the envt, the selections are already
sorted out by the parser.

================= htsearch/Display.cc.  =================

$ diff  Display.cc.oringinal Display.cc

257a258,259
>     vars.Add("SELECTED_FORMAT", new String(format)); //RFS added  16/6/98
>
285a288,291
>     vars.Add("SELECTED_METHOD", new String(config["match_method"])); //RFS



=========  in context  =================

> 254

    String      *str;
    char        *format = input->get("format");
    String      *in;

 +  vars.Add("SELECTED_FORMAT", new String(format)); //RFS added  16/6/98

    str = new String();
    *str << "<select name=format>\n";
    for (i = 0; i < templates.displayNames.Count(); i++)



> 285
   *str << "</select>\n";
    vars.Add("METHOD", str);

+   vars.Add("SELECTED_METHOD", new String(config["match_method"])); //RFS


    //
    // If a paged output is required, set the appropriate variables
    //



-- Rob.

....................................................................
   Rob Stone, Dept Psychology, University of York, York, YO10 5DD
 [EMAIL PROTECTED] http://www.york.ac.uk/~rfs1/  Tel +44 1904 433161
how many peeps at EJC98? -> http://chocfest.york.ac.uk/ejccomp.shtml
....................................................................


----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.

Reply via email to