Search

J

jhernan

Guest
I am trying to modify the search capabilities of DADAbink to make the life more pleasant to users. I will like to set up a search form to search two fields in a table by entering a text value in a input space. How can I customize the search form so when a user searches for a like value it automaically searches two fields? Any idea

 
Z

z

Guest
this might work..

<SCRIPT LANGUAGE=JavaScript>

function add1() {

var x = document.contacts_form.multi.value;

document.contacts_form.insert_name_of_field1_here.value = x;

document.contacts_form.insert_name_of_field2_here.value = x;

}

</SCRIPT>

<FORM target="mainFrame" name=contacts_form action="/cgi-bin/db/form.php?table_name=insert_name_of_field&page=0&function=search&order=insert_name_of_field" method=post encType=multipart/form-data onSubmit="return add1()">

<INPUT MAXLENGTH=200 NAME=multi SIZE="50">

<INPUT TYPE="SUBMIT" VALUE="Submit">

<INPUT TYPE=hidden NAME=insert_name_of_field1_here>

<INPUT TYPE=hidden NAME=insert_name_of_field2_here>

</FORM>



dont forget to replace all "insert_name_of_field" with correct variables !

 
Top