So I'm attempting to make a page in Visualforce(salesforce's page creator), and am having issues with the javascript aspect of it. Basically what should happen is that the section will generate a series of links. The javascript needs to click those links. I'm using jquery
<apex:page standardcontroller="Account" extensions="maininvoice">
<apex:repeat value="{!theListOfIDs}" var="anId">
<apex:outputLink target="_blank" value="{!URLFOR($Page.invoice2,anId)}" styleClass="name" />
</apex:repeat>
<apex:includeScript value="{!URLFOR($Resource.jquery, 'js/jquery-1.4.2.min.js')}"/>
<script type="text/javascript">
var j$ = jQuery.noConflict();
j$(document).ready(function(){
var anchortags = j$('.name');
for(i=0;i<=anchortags.length;i++){
var currentTag=anchortags[i];
currentTag.trigger(click);
alert("your mother");
}
}
);
</script>
</apex:page>