SharePoint 通讯录查询
利用Form Web Part方便查询通讯录。
<div style="height:400px;">
<script type="text/javascript">
var timeout = -1;
function searchChange(textbox) {
var text = textbox.value;
if (timeout != -1) clearTimeout(timeout);
timeout = setTimeout("commitSearch('" + text + "')", 400);
}
function commitSearch(text) {
var frame = document.getElementById("contactFrame");
if (text == "") frame.src = "Results.aspx?ReturnAll=Yes";
else frame.src = "Results.aspx?Search=" + text;
}
</script>
<div class="ms-listdescription">Use the text field below to search for contacts by First Name, Last Name, Full Name, or Company.</div>
<input type="text" style="border:1px gray solid;" id="contactSearch" name="contactSearch" onkeyup="searchChange(this);"/><br/>
<iframe id="contactFrame" style="width:100%; height: 100%; margin-bottom:-30px; padding-bottom:30px;" src="Results.aspx?ReturnAll=Yes" scrolling="auto" frameborder="no">
</iframe>
</div>
转载:
http://www.eggheadcafe.com/software/aspnet/32427323/add-multiple-form-box-to.aspx
Hey all Hope someone out there can help
I was wondering how would one add a second or third form text box to
the default page of the contact management template for wss. also i
would need the commit search to include boxa + boxB in the search
criteria of results.aspx. for instance if i wanted [ john ] +
[ Arizona ] the results would look for any items that have both those
criteria. hope this is clear. i would be greatful for any help
thanks .
this is the code by default:
var timeout = -1;
function searchChange(textbox) {
var text = textbox.value;
if (timeout != -1) clearTimeout(timeout);
timeout = setTimeout("commitSearch('" + text + "')", 400);
}
function commitSearch(text) {
var frame = document.getElementById("contactFrame");
if (text == "") frame.src = "results1.aspx?ReturnAll=Yes";
else frame.src = "results1.aspx?Search=" + text;
}
for contacts by First Name, Last Name, Full Name, or Company.</div>
id="contactSearch" name="contactSearch" onkeyup="searchChange(this);"/
id="contactSearch1" name="contactSearch1"
onkeyup="searchChange1(this);"/><br/>
bottom:-30px; padding-bottom:30px;" src="results1.aspx?ReturnAll=Yes"
scrolling="auto" frameborder="no">
浙公网安备 33010602011771号