Can you pass an AutoNumber Id from a database table made with asp to another page using javascript?
I have one page Form.asp on this page i have a javascript function that opens a window with Table.asp. This is a database table of images from a database. (this whole part works perfectly)
Now on Table.asp i have a form and a javascript function that when a user clicks on the button beside the text box which has the AutoNumber Id in it, its suppose to send that number to the text box on the parent(Form.asp) page.
all it is doing is sending null value?
this is the script to send the value
<script language=javascript>
function setParent(){
window.opener.document.theForm.IconId.value =
document.myForm.thisBox("IconId"
}
</script>
this is the asp for the table
<%
fp_sQry="SELECT * FROM ICON"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=2 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" i-CheckSum="19434" endspan -->
<tr>
<td><input type="text" size="5" name=thisBox value='<%=FP_FieldVal(fp_rs,"IconID"%>'><input type="submit" value="Button" name="B1" onClick="setParent();"></td>
<td><img border="0" src="<%=FP_FieldLink(fp_rs,"Icon"%>"></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" i-CheckSum="56926" endspan -->
</tbody>
</table>
<p> </p>
</form>
can anyone help?
I have one page Form.asp on this page i have a javascript function that opens a window with Table.asp. This is a database table of images from a database. (this whole part works perfectly)
Now on Table.asp i have a form and a javascript function that when a user clicks on the button beside the text box which has the AutoNumber Id in it, its suppose to send that number to the text box on the parent(Form.asp) page.
all it is doing is sending null value?
this is the script to send the value
<script language=javascript>
function setParent(){
window.opener.document.theForm.IconId.value =
document.myForm.thisBox("IconId"
}
</script>
this is the asp for the table
<%
fp_sQry="SELECT * FROM ICON"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=2 align=left width=""100%"">No records returned.</td></tr>"
fp_sDataConn="Database1"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--webbot bot="DatabaseRegionStart" i-CheckSum="19434" endspan -->
<tr>
<td><input type="text" size="5" name=thisBox value='<%=FP_FieldVal(fp_rs,"IconID"%>'><input type="submit" value="Button" name="B1" onClick="setParent();"></td>
<td><img border="0" src="<%=FP_FieldLink(fp_rs,"Icon"%>"></td>
</tr>
<!--webbot bot="DatabaseRegionEnd" startspan b-tableformat="TRUE"
b-menuformat="FALSE" u-dbrgn2="../_fpclass/fpdbrgn2.inc" i-groupsize="0"
clientside tag="TBODY"
local_preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>"
preview="<tr><td colspan=64 bgcolor="#FFFF00" align="left" width="100%"><font color="#000000">This is the end of a Database Results region.</font></td></tr>" --><!--#include file="../_fpclass/fpdbrgn2.inc"-->
<!--webbot bot="DatabaseRegionEnd" i-CheckSum="56926" endspan -->
</tbody>
</table>
<p> </p>
</form>
can anyone help?