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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unexpected Call to Method or Property Access error

Status
Not open for further replies.

tc3596

Technical User
Mar 16, 2001
283
0
0
Hopefully, someone can assist me with this as it is officially driving me crazy at this point.

I have a web page with a number of records in a list...each has a checkbox. User can check however many records they choose. After selecting (i.e. 5 ) checkboxes, they click a button to email these individuals.

Here is my javascript on click function...


<script type="text/javascript">
function EmailInvoice() {
var checked;
var vASPPage;
var i;
var aa = document.getElementById('BacoList');//

for (var i = 0; i < aa.elements.length; i++) {

if (aa.elements.checked == true) {
vASPPage = "CSSDKEmail_Transfer.asp?Email=" + aa.elements.value;
i = window.showModalDialog("CSSDK_CustomLookUpPage.asp?url=" + vASPPage, window, "dialogWidth:550px;resizeable=yes");

}
}

}
</script>


...essentially, it loops thru each check in form BacoList. if checked it opens a modal window. This page (CSSDKEmail_Transfer.asp) simply uses cdosys to send the email out. The first one goes thru fine (fyi..I am hard coding the from and to to same address for now). After the first, I get the error in the subject line "Unexpected Call to Method or Property Access". The code stops on i++.

If there is a better solution for what I am trying to accomplish, I am all ears. Thanks in advance.

Tim
 
perhaps because you're using i twice for 2 different things?
perhaps use j for your looping index instead?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top