UserList: Advanced Frontend Search

18 years 3 weeks ago #8732 by Praetorian
Replied by Praetorian on topic Re:UserList: Advanced Frontend Search
Hi !!!
I think I have the solution inspired by this
Add this javascript function just after the function search(lim):
[code:1]
function clearForm(formIdent)
{
var form, elements, i, elm;
form = document.getElementById
? document.getElementById(formIdent)
: document.forms[formIdent];

if (document.getElementsByTagName)
{
elements = form.getElementsByTagName('input');
for( i=0, elm; elm=elements.item(i++); )
{
if (elm.getAttribute('type') == "text"«»)
{
elm.value = '';
}
}
}

// Actually looking through more elements here
// but the result is the same.
else
{
elements = form.elements;
for( i=0, elm; elm=elements[i++]; )
{
if (elm.type == "text"«»)
{
elm.value ='';
}
}
}
}
[/code:1]

Then replace :
[code:1]
<input type=\"reset\" value=\"reset\">
[/code:1]
By :
[code:1]
<input type=\"button\" value=\"reset\" onclick=\"clearForm('ricerca')\">
[/code:1]

For now, it works very well for me... If somebody finds any bug, thanks to report it.

Praetorian.

Please Log in to join the conversation.

18 years 3 weeks ago #8734 by FrySpy
Replied by FrySpy on topic Re:UserList: Advanced Frontend Search
It seems to be the only solution...
Great Job!

Thanks,
Francesco

Please Log in to join the conversation.

18 years 1 week ago #9922 by ptkho
Replied by ptkho on topic Re:UserList: Advanced Frontend Search
Just want to inform everybody here there's another advanced search, but this one is a components. Biggest advantage is that no hacks are necessary. Just install the component and enable which fields are to be searchable.
Look in this forum: www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/catid,20/id,8736/
website: www.emptorum.com

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.520 seconds

Facebook Twitter LinkedIn