Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with search query string

Status
Not open for further replies.

nomu26

Programmer
Sep 10, 2003
22
ZA
I have created a form to perform a search with dropdowns and textboxes, I want the user to select any search criteria, if all is selected it works fine but if you select some of the fields it return an error :Microsoft JScript runtime error: object doesn't support this property or method, here's the code:

<script language="javascript" type="text/javascript">
var wMyWindow;
function MoreInfo(sValue)
{
sValue = sValue +'?qstrEntityCode=' + document.frmSalesReport.cboEntity.options[document.frmSalesReport.cboEntity.selectedIndex].value + '&qstrEntity=' + document.frmSalesReport.cboEntity.options[document.frmSalesReport.cboEntity.selectedIndex].text + '&qstrVolumeNo=' + document.frmSalesReport.cboVolumeNo.options[document.frmSalesReport.cboVolumeNo.selectedIndex].value + '&qstrUseCode=' + document.frmSalesReport.cboUseCode.options[document.frmSalesReport.cboUseCode.selectedIndex].value + '&qstrRateCode=' + document.frmSalesReport.cboRateCode.options[document.frmSalesReport.cboRateCode.selectedIndex].value + '&qstrHomogeneousCode=' + document.frmSalesReport.txtHomogeneousCode.value + '&qstrBlockPlan=' + document.frmSalesReport.txtBlockPlan.value;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
if (sValue.length > 1)
{
if (wMyWindow && (((bName.indexOf("Netscape") > -1) && (bVer > 2)) || ((bName.indexOf("Explorer") > 0) && (bVer > 2))))
{
if (!wMyWindow.closed)
{
wMyWindow.close();
}
}
wMyWindow = window.open(sValue ,'_blank');
}
}
</script>
<form>
<TR>
<TD align="center" bgColor="#9cb0be" colSpan="2"><A href="javascript:MoreInfo('SalesAnalysisReportView.aspx');"><IMG id="IMG1" alt="Submit" src="../images/submit.gif" align="absMiddle" border="0" runat="server"></A>
</TD>
</TR>
</form>

if someone can tell me what's wrong with my query string cause i've even tried testing one by one it still gives me the error but if I select everything it returns no errors.

thanks
cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top