rejetto forum

Changing The Default Search Option

0 Members and 1 Guest are viewing this topic.

Offline Stonesteel

  • Occasional poster
  • *
    • Posts: 31
    • View Profile
Greetings!

I just wanted to ask, what value should I change in these codes so that the default search is File(s) only not Both, because the default option selected in the template is Both.

Code: [Select]
function searchQuery() {
frm = document.searchForm;
if(frm.query.value.length < 3) {
alert(lv_searchAlert);
} else {
frm.recursive.checked ? recursive ="&recursive" : recursive ="";
for(x=0; x<frm.choice.length; x++) {
if(frm.choice[x].checked ==1) {
if(frm.choice[x].value =="file") {
searchMode ="?files-filter=";
filter="&folders-filter=%5C";
} else if(frm.choice[x].value =="folder") {
searchMode ="?folders-filter=";
filter="&files-filter=%5C";
} else {
searchMode ="?filter=";
filter="";
}
}
}
for(c=0; c<frm.root.length; c++) {
if(frm.root[c].checked ==1) {
frm.root[c].value =="current" ? searchFrom ="http://"+serverHost+serverFolder : searchFrom ="http://"+serverHost;
}
}
document.location.href = searchFrom+searchMode+"*"+frm.query.value+"*"+recursive+filter;
}
}
"No Matter How Gifted You Are, Alone Cannot Change The World."


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
It's not in the default template???? 

version of hfs and what is the template used?


Offline Stonesteel

  • Occasional poster
  • *
    • Posts: 31
    • View Profile
Hi Mars, I got it from the default template/rawr_default/code/rawr_main.js


it's inside the javascript..


I am currently using HFS 282, with the latest template 0.1.3.  ;D
"No Matter How Gifted You Are, Alone Cannot Change The World."


Offline Stonesteel

  • Occasional poster
  • *
    • Posts: 31
    • View Profile
Any update here?  ;D
"No Matter How Gifted You Are, Alone Cannot Change The World."


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile
the "default" it's not in the code you posted.
you posted the javascript, while it's actually in the html.


Offline Stonesteel

  • Occasional poster
  • *
    • Posts: 31
    • View Profile
Hello rejetto, but I found the code inside the rawr_main javascript, well then what should I change in the code so that the default search will be in the File(s) option not in Both?
"No Matter How Gifted You Are, Alone Cannot Change The World."


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13521
    • View Profile