how would I add several text boxes to a template that are being fed to a jquery that then feeds another template to a stored proecure that runs a like filter on a dataset.
This is what I want to do
This is what I have created in the templates, but the alert test for the javascript is not working. How do I fault find and where do I put javascript objects in the template to access as a function.
<xmod:scriptblock scriptid="srch5" registeronce="true">
<script language="javascript">
function searchnow(){
var sa = document.getElementById("Last");
var Lastlst = sa.options[sa.selectedIndex].value;
var w = document.getElementById("Supply");
var Suplst = w.options[w.selectedIndex].value;
var y = document.getElementById("Farm");
var Farmlst = y.options[y.selectedIndex].value;
/*
Build url
*/
var locid1='http://hertyu.com/Customers/tabid/143/Default.aspx?';
var str1= 'LastName='+Lastlst;
var str2= '&SupplierNo='+Suplst;
var str3= '&Farmname='+Farmlst;
var newurl=locid1+str1+str2+str3;
/*
Test Values
*/
Alert(Lastlst+" "+Suplst+" "+Farmlst);
/*
Feed url parameters
*/
window.location.href=newurl;
}
</script>
</xmod:scriptblock>
<xmod:Template Id="temp1" UsePaging="False" Ajax="False" Editroles="">
<ListDataSource CommandText="SELECT customerid,Contact FROM PBC_vw_Custpers order by Lastname desc" />
<HeaderTemplate>
LastName:<input type="text" id="Last" />
<br/> SupplierNumber:<input type="text" id="Supply" />
<br/> Farm Name:<input type="text" id="Farm" />
<br/>
<input type="button" value="Search" onclick="searchnow()"></button>
<br/>
</HeaderTemplate>
<ItemTemplate>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</xmod:Template>
<xmod:Template UsePaging="True" PageSize='5' Ajax="False" AddRoles="SalesRep" EditRoles="SalesRep" DeleteRoles="" DetailRoles="">
<ListDataSource CommandText="[PBC_ContactFilter2]" CommandType="StoredProcedure">
<Parameter Name="LastName" Value='[[Url:LastName]]' DataType="string" DefaultValue="" />
<Parameter Name="SupplierNumber" Value='[[Url:SupplierNo]]' DataType="string" DefaultValue="" />
<Parameter Name="Farmname" Value='[[Url:Farmname]]' DataType="string" DefaultValue="" />
</ListDataSource>
<HeaderTemplate>
<style type="text/css">
etc...not included as not the issue........