Hello Jake,
This is very surprising that it's ur site and u r not replying
......strange..neways I used ur searchbox coding n now with Textbox i want to
use a ListBox....something similiar to Advanced Search...
I'm new to LN as well as JavaScript so I'm just tryign at my best.I'm enclosing
my coding here ..Please chk it n do tell me that where I'm doing wrong ...It's
all ur coding
This is SubForm Coding with 'Query' as hidden field of "Computed for display"
type
Here qyery field
<table width="150",border="0",cellspacing="0",cellpadding="0">
<tr>
<td colspan="2">Search by:</td>
</tr>
<td>
function openDbRelativeURL( url, target ){
//Check we have a target window;
target = (target == null ) ? window : target;
//Work out the path of the database;
path = location.pathname.split('.nsf')[0] + '.nsf/';
target.location.href = path + url;
}
function doSearch ( s ,p) {
var regExp1 = /\bfield\b/;
var regExp2 = /[(,),<,>,\[,\]]/;
var str = s.value;
var str2 = p.value;
alert("hello");
if ( str == "" ){
alert("Please be sure to enter something to search for.");
s.focus();
} else {
if ( typeof regExp1.source != 'undefined' ) //supports regular expression
testing
if ( regExp1.test( str ) || regExp2.test( str ) ){
var alrt = "Please note that you can not include:";
alrt += "\n\nThe reserved word 'field'\nthe characters [, ], (, ), < or >";
alrt += "\n\nin your search query!\n\nIf you are confident that you know";
alrt += "\nwhat you are doing, then you can\nmanually produce the URL required."
s.focus();
return alert( alrt );
}
openDbRelativeURL("str2?SearchView&Query=" + escape( str ) +
"&start=1&count=1000");
}
}
It's same as given on ur site.
After making the subform I simply Insert it on new form where I have done the
HTMLHeadContent ,Jsheader and Onsubmit coding as told in ur article ..
Now please check this code or tell me thw way I have to proceed to do this ....
I'm in great need Jake and I don't know why are you not responding to my
queries...
It will be a great help for me..
Thanx
Priyanka
Hello Jake, This is very surprising that it's ur site and u r not replying ......strange..neways I used ur searchbox coding n now with Textbox i want to use a ListBox....something similiar to Advanced Search... I'm new to LN as well as JavaScript so I'm just tryign at my best.I'm enclosing my coding here ..Please chk it n do tell me that where I'm doing wrong ...It's all ur coding
This is SubForm Coding with 'Query' as hidden field of "Computed for display" type
Here qyery field <table width="150",border="0",cellspacing="0",cellpadding="0"> <tr> <td colspan="2">Search by:</td> </tr> <td>
<B>Customer Status: </B> <SELECT NAME="SearchString"> <OPTION>PINView <OPTION>ByTech <OPTION>Inactive</SELECT> <P> </td> <tr> <td> <input type="text" name="Query" size="15"> </td> <td> <input type="button" name="Search" value="Go" size="5" onclick="doSearch(this.form.Query,this.form.SearchString.options[selectedIndex.v alue]);"/> </td> </tr> </table>
Now subform JsHeader Coding :
function openDbRelativeURL( url, target ){ //Check we have a target window; target = (target == null ) ? window : target; //Work out the path of the database; path = location.pathname.split('.nsf')[0] + '.nsf/'; target.location.href = path + url; }
function doSearch ( s ,p) { var regExp1 = /\bfield\b/; var regExp2 = /[(,),<,>,\[,\]]/; var str = s.value; var str2 = p.value; alert("hello"); if ( str == "" ){ alert("Please be sure to enter something to search for."); s.focus(); } else { if ( typeof regExp1.source != 'undefined' ) //supports regular expression testing if ( regExp1.test( str ) || regExp2.test( str ) ){ var alrt = "Please note that you can not include:"; alrt += "\n\nThe reserved word 'field'\nthe characters [, ], (, ), < or >"; alrt += "\n\nin your search query!\n\nIf you are confident that you know"; alrt += "\nwhat you are doing, then you can\nmanually produce the URL required." s.focus(); return alert( alrt ); } openDbRelativeURL("str2?SearchView&Query=" + escape( str ) + "&start=1&count=1000"); } }
It's same as given on ur site. After making the subform I simply Insert it on new form where I have done the HTMLHeadContent ,Jsheader and Onsubmit coding as told in ur article .. Now please check this code or tell me thw way I have to proceed to do this .... I'm in great need Jake and I don't know why are you not responding to my queries... It will be a great help for me.. Thanx Priyanka