You need to sign in to do that
Don't have an account?
onclick Event
Apex repeat function here would repeat the days of the week, iterating from Monday to Sunday also displaying the day alongside.
My problem is in the prevWeek.
prevWeek is a button. (supposed to be)
When it is clicked I want the changes in goprev to take place.
I need wcTopBar to display the previous weeks days.
Pl take a look at
<apex:actionSupport event="onclick" action="{!goprev}" rerender="wcTopBar" />
and let me know what is deficient to do the job.
<apex:outputPanel id="wcTopBar" layout="block" styleClass="containerAD noscroll" style="height: 37px;">
<div class="overflowContainer">
<div class="weekLabels">
<apex:repeat value="{!daysOfWeek}" var="d">
<div class="{!d.divClass}">
<div><span style="{!d.spanStyle}"><apex:outputText value="{!d.dayName}" escape="false" /></span></div>
</div>
</apex:repeat>
___________________________________________________
<div class="prevWeek" id="prevweek">
<a class="small left _background1 _border1 _background1Hover t_btn">
<img src="{!URLFOR($Resource.Library, 'images/prev.png')}" width="13" height="28" />
<apex:actionSupport event="onclick" action="{!goprev}" rerender="wcTopBar" />
</a>
</div>
______________________________________________________________________
public class calendarController{
public List<dayInfo> daysOfWeek {get;set;}
Date pw;
public calendarController(){
daysOfWeek = new List<dayInfo>();
pw = system.Today().toStartOfWeek();
daysOfWeek = calUtil.buildDaysOfWeek(pw);
}
public PageReference goprev(){
pw = system.Today().toStartOfWeek().addDays(-7);
daysOfWeek = calUtil.buildDaysOfWeek(pw);
return null;
}
public PageReference goprev(){
pw = system.Today().toStartOfWeek().addDays(-7);
daysOfWeek = calUtil.buildDaysOfWeek(pw);
return null;
}
Hi,
Try using <apex:Image> tag instead of <img> tag.
Also, your <apex:ActionSupport> tag should be within the <apex:image> tag.
So your VF Page code will look something like this
<apex:imge src="{!URLFOR($Resource.Library, 'images/prev.png')}" width="13" height="28" >
<apex:actionSupport event="onclick" action="{!goprev}" rerender="wcTopBar" />
</apex:image>
Hope this will work for you!!
I hope this works!!
<apex:image src="{!URLFOR($Resource.Library, 'images/prev.png')}" width="13" height="28" >
<apex:actionSupport event="onclick" action="{!goprev}" rerender="wcTopBar" />
</apex:image>
This is not working
Error: Unsupported attribute src in <apex:image> in calendar at line 77 column 137
Hi,
Use Url property instead of src :D and chk.