Re: [greenstone-users] RE: Press Enter to start the query with mgpp

From Katherine Don
DateFri, 04 Aug 2006 13:06:58 +1200
Subject Re: [greenstone-users] RE: Press Enter to start the query with mgpp
In-Reply-To (3F17EC9A8CCEAA408C8CCBE42B6785D9012BD670-sndc01-central-saniline-com)
Hi Blanca

I have recently added this into Greenstone, and it will be in the next
release. This is what I did:

In macros/query.dm, I added the following into the _formfunctions_ macro:

// makes a form submit itself when enter is pressed in a text field
function entersubmit(event) {

if (window.event && window.event.keyCode == 13) {
beginSearch();
} else {
if (event && event.which == 13) {
beginSearch();
} else {
return true;
}
}
}


Then for each <input type=text> part of _regformelement_,
_firstadvformelement_, and _advformelement_ I added
onkeypress="updatefqv(); entersubmit(event);"

For example, in _regformelement_:
<input type=text size=39 name="fqv" onChange="updatefqv();"
onkeypress="updatefqv(); entersubmit(event);">

Regards,
Katherine


Dep.Gesti□n Documental wrote:
> Dear friends,
> I have consulted the Greenstone Mailing List Archives and I have found the message
> greenstone-users Digest, Vol 37, Issue 21
>
> I have been trying to follow the directions to fix the query.dm document, so that the user starts the query by pressing the "Enter" key with a Form Search. But I haven't got a successful outcome. Is it possible that Greenstone have this function by default, when you publish the next Greenstone version?
>
> Thank you very much!
>
> P.S. (By the way, I would also accept any assistance to be able to fix this, thank you)
>
>
> Blanca Muyo Redondo
> Documentalista- Departamento de Operaciones
> - Saniline -
> Fructu□s Gelabert 2-4, 08970 Sant Joan Desp□, Barcelona (Spain)
> Tel. +34 93 477 62 60 Fax +34 93 477 62 40
> Mail: bmuyo@saniline.com ; Web: www.saniline.com
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
>