View Full Version : iframe and grid

18 May 2012, 5:21 AM
How can I add the current time in the iframe to the value=eten+"--"+etam line and the Today's Date--Currrent Time in Ethiopia? http://www.myethiopia.org/QuickLinks/Calendar/May2012/todaydate.html

var grid = Ext.create('Ext.grid.Panel', {
store: store,
layout: 'fit',
dockedItems: [
xtype: 'toolbar',
dock: 'top',
items: [
html: '<iframe src="http://free.timeanddate.com/clock/i2a2svwb/n7/tcddffe8/pcddffe8/bo2" frameborder="0" width="84" height="20"></iframe>'
columns: [
text: 'Calendars',
flex: 1,
height: 15,
sortable: false,
dataIndex: 'calendar'
text: 'Date',
width: 400,
sortable: false,
dataIndex: 'date',
//rowindex keeps track of the row number which corresponds to the Calendar name
//based on row number/calendar name - display the correct date
renderer:function(value, metaData, record, rowIndex){
case 1 :
var etam =jqueryDates['ethiopian'];
var eten = jqueryDates['EtDateen'];

//display amharic and english version.
value = eten +"------"+ etam;
return value.toString();

21 May 2012, 12:55 AM
Are you trying to get current time value from an iframe which is not in the same domain?

If yes, i'm sorry but you cannot.

21 May 2012, 6:02 AM
Thanks for the response. I am confused.
I have already displayed the time on the grid(see the link below) from a different domain.
All I am asking is really about positionoing it either on the same line as
1. value=eten+"--"+etam line
2. Today's Date--Currrent Time in Ethiopia

Is this not possible?

21 May 2012, 8:31 AM
If i'm getting, you can use html both in grid renderer and panel titles. So, try setting:

value += '<iframe>...</iframe>'
and see how it's shown.