I have two pages (both pages written in ASP/javascript). There is a search page (search.asp) and a results page (results.asp). These two pages are loaded in a frameset (frame.htm). Whenever I rename "frame.htm" to "frame.hta" everything fails to work correctly. Do ASP pages work inside of an HTA? I'm trying to build a fairly simple database application to retrieve a record based on the user's entered data.
frame.hta
<html>
<head>
<title>main</title>
<HTA:APPLICATION ID="simple app"
APPLICATIONNAME="simple app"
BORDER="thick"
BORDERSTYLE="normal"
CAPTION="yes"
CONTEXTMENU="no"
INNERBORDER="yes"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SCROLL="auto"
SCROLLFLAT="no"
SINGLEINSTANCE="yes"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="maximize"
</head>
<frameset rows="99,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="files/item_lookup_search.htm" application = "YES" name="topFrame" frameborder="no" scrolling="NO" noresize title="topFrame" >
<frame src="files/blank.htm" application = "YES" name="mainFrame" frameborder="no" title="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>
search.asp:
<html>
<head>
<title>Item Lookup Search</title>
</head>
<body>
<form action="/web/files/item_lookup_results.asp" method="get" name="item_lookup" target="bottomFrame" id="item_lookup"
onSubmit="return validateForm(this)">
<table border="0" cellspacing="2" class="sort-table">
<thead>
<tr>
<td colspan="2">Item Lookup:
</td>
</tr>
</thead>
<tbody>
<tr>
<th width="94" valign="top">Item Number:</th>
<td width="351" > <div align="left">
<input name="txtItemcode" type="text" id="txtItemcode" size="20" maxlength="9">
<span class="highLite">*</span><img src="/files/images/spacer.gif" alt="" width="20" height="18">
<input type="submit" name="Submit" value="Search">
<input name="Reset" type="reset" id="Reset" value="Reset" onclick="submit(this)"><br>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
results.asp
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="/Connections/GENRET.asp" -->
<%
var Recordset1__varItemCode = "";
if (String(Request.QueryString("txtItemCode")) != "undefined" &&
String(Request.QueryString("txtItemCode")) != "") {
Recordset1__varItemCode = String(Request.QueryString("txtItemCode"));
}
%>
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset");
Recordset1.ActiveConnection = MM_GENRET_STRING;
Recordset1.Source = "SELECT a.itm_cd, a.ve_cd, a.vsn, a.stat_cd, a.des1, a.udf1, c.udf012, d.des div, e.des dept, f.des class, a.first_rcv_dt, a.lst_buy_cst, a.ret_prc init_ret FROM gm_itm a, gm_itm_udf c, div d, dept e, class f, cst g WHERE a.itm_cd = c.itm_cd and a.itm_cd = g.itm_cd and a.div_cd = d.div_cd and a.dept_cd = e.dept_cd and a.class_cd = f.class_cd and a.itm_cd = '"+ Recordset1__varItemCode.replace(/'/g, "''") + "' group by a.itm_cd, a.ve_cd, a.vsn, a.stat_cd, a.des1, a.udf1, c.udf012, d.des, e.des, f.des, a.first_rcv_dt, a.lst_buy_cst, a.ret_prc";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<html>
<head>
<title>Item </title>
</head>
<body>
<table width="514" border="0">
<tr>
<td colspan="7">Item Information </td>
</tr>
<tr>
<td width="141">Item Code: </td>
<td width="228"><%=(Recordset1.Fields.Item("ITM_CD").Value)%></td>
<td width="19"> </td>
<td width="21"> </td>
<td width="21"> </td>
<td width="21"> </td>
<td width="33"> </td>
</tr>
<tr>
<td>VSN:</td>
<td><%=(Recordset1.Fields.Item("VSN").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Vendor:<br>
</td>
<td><%=(Recordset1.Fields.Item("VE_CD").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Brand Code: </td>
<td><%=(Recordset1.Fields.Item("UDF1").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Brand Name: </td>
<td><%=(Recordset1.Fields.Item("UDF012").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Division:</td>
<td><%=(Recordset1.Fields.Item("DIV").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Department:</td>
<td><%=(Recordset1.Fields.Item("DEPT").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Class:</td>
<td><%=(Recordset1.Fields.Item("CLASS").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Description:</td>
<td><%=(Recordset1.Fields.Item("DES1").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>First Receipt Date: </td>
<td><%=(Recordset1.Fields.Item("FIRST_RCV_DT").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Initial Buy Cost:</td>
<td><%=(Recordset1.Fields.Item("LST_BUY_CST").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Initial Retail </td>
<td><%=(Recordset1.Fields.Item("INIT_RET").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Status:</td>
<td><%=(Recordset1.Fields.Item("STAT_CD").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
...whenever the search page is submitted the ASP attempts to load but then fails. It will not load into the bottom frame. Lastly, is there something special about the way you should reference the supporting files (images, etc.) none of these work corretly either. All I want to do is make a simple application that can be distributed to a persons desktop, without me having to go and create a full blown website.
frame.hta
<html>
<head>
<title>main</title>
<HTA:APPLICATION ID="simple app"
APPLICATIONNAME="simple app"
BORDER="thick"
BORDERSTYLE="normal"
CAPTION="yes"
CONTEXTMENU="no"
INNERBORDER="yes"
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SCROLL="auto"
SCROLLFLAT="no"
SINGLEINSTANCE="yes"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="maximize"
</head>
<frameset rows="99,*" cols="*" framespacing="0" frameborder="NO" border="0">
<frame src="files/item_lookup_search.htm" application = "YES" name="topFrame" frameborder="no" scrolling="NO" noresize title="topFrame" >
<frame src="files/blank.htm" application = "YES" name="mainFrame" frameborder="no" title="mainFrame">
</frameset>
<noframes><body>
</body></noframes>
</html>
search.asp:
<html>
<head>
<title>Item Lookup Search</title>
</head>
<body>
<form action="/web/files/item_lookup_results.asp" method="get" name="item_lookup" target="bottomFrame" id="item_lookup"
onSubmit="return validateForm(this)">
<table border="0" cellspacing="2" class="sort-table">
<thead>
<tr>
<td colspan="2">Item Lookup:
</td>
</tr>
</thead>
<tbody>
<tr>
<th width="94" valign="top">Item Number:</th>
<td width="351" > <div align="left">
<input name="txtItemcode" type="text" id="txtItemcode" size="20" maxlength="9">
<span class="highLite">*</span><img src="/files/images/spacer.gif" alt="" width="20" height="18">
<input type="submit" name="Submit" value="Search">
<input name="Reset" type="reset" id="Reset" value="Reset" onclick="submit(this)"><br>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
results.asp
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="/Connections/GENRET.asp" -->
<%
var Recordset1__varItemCode = "";
if (String(Request.QueryString("txtItemCode")) != "undefined" &&
String(Request.QueryString("txtItemCode")) != "") {
Recordset1__varItemCode = String(Request.QueryString("txtItemCode"));
}
%>
<%
var Recordset1 = Server.CreateObject("ADODB.Recordset");
Recordset1.ActiveConnection = MM_GENRET_STRING;
Recordset1.Source = "SELECT a.itm_cd, a.ve_cd, a.vsn, a.stat_cd, a.des1, a.udf1, c.udf012, d.des div, e.des dept, f.des class, a.first_rcv_dt, a.lst_buy_cst, a.ret_prc init_ret FROM gm_itm a, gm_itm_udf c, div d, dept e, class f, cst g WHERE a.itm_cd = c.itm_cd and a.itm_cd = g.itm_cd and a.div_cd = d.div_cd and a.dept_cd = e.dept_cd and a.class_cd = f.class_cd and a.itm_cd = '"+ Recordset1__varItemCode.replace(/'/g, "''") + "' group by a.itm_cd, a.ve_cd, a.vsn, a.stat_cd, a.des1, a.udf1, c.udf012, d.des, e.des, f.des, a.first_rcv_dt, a.lst_buy_cst, a.ret_prc";
Recordset1.CursorType = 0;
Recordset1.CursorLocation = 2;
Recordset1.LockType = 1;
Recordset1.Open();
var Recordset1_numRows = 0;
%>
<html>
<head>
<title>Item </title>
</head>
<body>
<table width="514" border="0">
<tr>
<td colspan="7">Item Information </td>
</tr>
<tr>
<td width="141">Item Code: </td>
<td width="228"><%=(Recordset1.Fields.Item("ITM_CD").Value)%></td>
<td width="19"> </td>
<td width="21"> </td>
<td width="21"> </td>
<td width="21"> </td>
<td width="33"> </td>
</tr>
<tr>
<td>VSN:</td>
<td><%=(Recordset1.Fields.Item("VSN").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Vendor:<br>
</td>
<td><%=(Recordset1.Fields.Item("VE_CD").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Brand Code: </td>
<td><%=(Recordset1.Fields.Item("UDF1").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Brand Name: </td>
<td><%=(Recordset1.Fields.Item("UDF012").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Division:</td>
<td><%=(Recordset1.Fields.Item("DIV").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Department:</td>
<td><%=(Recordset1.Fields.Item("DEPT").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Class:</td>
<td><%=(Recordset1.Fields.Item("CLASS").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Description:</td>
<td><%=(Recordset1.Fields.Item("DES1").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>First Receipt Date: </td>
<td><%=(Recordset1.Fields.Item("FIRST_RCV_DT").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Initial Buy Cost:</td>
<td><%=(Recordset1.Fields.Item("LST_BUY_CST").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Initial Retail </td>
<td><%=(Recordset1.Fields.Item("INIT_RET").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Status:</td>
<td><%=(Recordset1.Fields.Item("STAT_CD").Value)%></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
...whenever the search page is submitted the ASP attempts to load but then fails. It will not load into the bottom frame. Lastly, is there something special about the way you should reference the supporting files (images, etc.) none of these work corretly either. All I want to do is make a simple application that can be distributed to a persons desktop, without me having to go and create a full blown website.