arguments are od the wrong type...

admin

Administrator
Staff member
hello and help. i have xml file with 4 data islands... when i click on one of them, i wan't just that data island to display in new window: here is the code:

<SCRIPT event=onload for=window>
dop_xml_print.XMLDocument.load("dop.xml")
</SCRIPT>

<OBJECT id=dop_xml_print height=0 width=0
classid=clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39></OBJECT>
<META content="MSHTML 6.00.2600.0" name=GENERATOR>

<script language="JavaScript" type=text/javascript>
function printPage(field) {
var prnwnd_hndlr;
dop_xml_print.recordset.absoluteposition=field.parentElement.rowIndex;
td_naslov.innerHTML=dop_xml_print.recordset("naslov")
td_sadrzaj.innerHTML=dop_xml_print.recordset("sadrzaj")
td_autor.innerHTML=dop_xml_print.recordset("autor")
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
prnwnd_hndlr = window.open("", "Preview",'height=450,width=430,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');
prnwnd_hndlr.document.write("<HTML>\n");
prnwnd_hndlr.document.write("<HEAD>\n");
prnwnd_hndlr.document.write("<link href=http://www.webdeveloper.com/forum/archive/index.php/\"css_dop.css\" rel=\"stylesheet\" type=\"text/css\">\n");
prnwnd_hndlr.document.write("</HEAD>\n");
prnwnd_hndlr.document.write("\t<BODY>\n");
prnwnd_hndlr.document.write("<xml id=\"dop_xml\" async=\"false\" src=\"dop.xml\"></xml>\n");
prnwnd_hndlr.document.write("\t<TABLE width=100% cellspacing=0 cellpadding=0 border=0 \n");
prnwnd_hndlr.document.write("\t<tr>\n");
prnwnd_hndlr.document.write("\t<td idfld=\"td_naslov\" valign=\"top\" colspan=\"2\"></td>\n");
prnwnd_hndlr.document.write("\t</tr>\n");
prnwnd_hndlr.document.write("\t<tr>\n");
prnwnd_hndlr.document.write("\t<td id=\"td_sadrzaj\" valign=\"top\" colspan=\"2\"></td>\n");
prnwnd_hndlr.document.write("\t</tr>\n");
prnwnd_hndlr.document.write("\t<tr bgcolor=\"#F5F5F5\">\n");
prnwnd_hndlr.document.write("\t<td valign=\"top\" colspan=\"2\" height=\"5\"><img src=\"elementi/spacer.gif\" height=\"5\" width=\"10\"></td>\n");
prnwnd_hndlr.document.write("\t</tr>\n");
prnwnd_hndlr.document.write("\t<tr>\n");
prnwnd_hndlr.document.write("\t<td id=\"td_autor\" valign=\"top\">Napisao: </td>\n");
prnwnd_hndlr.document.write("\t</tr>\n");
prnwnd_hndlr.document.write("</TABLE>\n");

prnwnd_hndlr.document.write("\t</BODY>\n");
prnwnd_hndlr.document.write("</HTML>\n");
prnwnd_hndlr.document.close();
}
else {
if (window.print)
window.print();
else
alert("巃o nam je, Va?internet preglednik ne podr瀉va ovu opciju.");
}
}
</script>

the problem is in line
"dop_xml_print.recordset.absoluteposition=field.parentElement.rowIndex;"
i get message "arguments are od the wrong type, put of range..."

can anyone help? tnx
 
Back
Top