The mixture of languages can be confusing. But if we assume that the asp or asp-like part is OK and is being parsed as expected by the server, it would probably output an integer. So you would have something like:
Code:
toggleSet(document.forms[0].x_siteid[3]);
But, from what you say it appears that the toggleSet function is on the parent page, and that this code is in an iframe of that parent page. So you would at least have to do:
Code:
parent.toggleSet(document.forms[0].x_siteid[3]);
Now, you've made no indication of which of these two pages that forms[0] is on. If it is on the parent page, you would also need to add:
Code:
parent.toggleSet(parent.document.forms[0].x_siteid[3]);
Additionally, this pretty much assumes that wherever the form is, that it has a property (possibly an element - an input, button or textarea, or perhaps just some assigned property) that can be addressed as x_siteid[#], where # is an integer.
Finally, for now, since session("siteid") must at least be a number or be a string that the server can type convert to a number (otherwise there would be an error on the server side), session("siteid") might still be out of range of what is expected as a possible property value for the x_siteid property of the form.
This last bit can be observed (what cint(session("siteid")-1) works out to be on a case by case basis), by viewing the served source code of the page that has this on it.
Firefox with the developer's extension for it added is good for that as it would allow you to view the iframe's page's source without having to load the page separately.
If you want more help:
Please post a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks