I am having problem to print table in VF page using JS array. my code.
<apex:page controller="customController" >
<script>
var json = new Array();
<apex:repeat value="{!appointmentList}" var="r">
json.push('{!r}');
</apex:repeat>
</script>
</apex:page>
I tried console.log(), it didn't work. I went through lot of blogs but no luck.
I want something like below, need to do some format data using JS. In java script After data formatting, final list want to print on VF page. I am not good with JS things. Please help on this.
<apex:page controller="customController" >
<script>
var json = new Array();
<apex:repeat value="{!appointmentList}" var="r">
json.push('{!r});
<table width="100%" style="font-size:13px;">
<tr>
<td>
<apex:outputText value="{0,date,EEEE - MMMM d, yyyy}" style="font-weight:bold;margin-bottom:2px;">
<apex:param value="{!s.startDateTime}" />
</apex:outputText>
<apex:outputText value="{0,date,h:mm a}">
<apex:param value="{!s.startDateTime}" />
</apex:outputText> -
<apex:outputText value="{0,date,h:mm a}">
<apex:param value="{!s.endDateTime}" />
</apex:outputText><b> ({!calendarProfile.userTimezone})</b>
</td>
</tr>
</table>
</apex:repeat>
</script>
</apex:page>
</apex:page>end....