Thursday, July 29, 2010

Wordpress 3.0

Wordpress 3.0 looks amazing. i used it and enjoyed very much. It comes with social networking support features.

Wednesday, July 28, 2010

Windows7 skype voice problem

I am using windows 7 but there a problem with my skype running on windows7. I didn't get voice and send my voice on skype voice chat. If anybody have solutions please reply to me. Thanks in advance.

Monday, July 12, 2010

How i can open a tab from a grid every tab calling dynamic function

How i can open a tab from a grid every tab call dynamic function for items of tab [solved].


Ext.QuickTips.init();
Ext.override(Desktop.ReportsWindow, {
createProxy: {},
createWindow: function () {

var desktop = this.app.getDesktop();
var win = desktop.getWindow(this.moduleId);
var app = this.app;
var url = this.app.connection;
var moduleId = this.moduleId;

var myData = [
['Diagnosis registry', 'Search patients that have a particular diagnosis or ICD9 code.', 'diagnosis'],
['Medication report', 'Search patients that have been prescribed a particular medicine.', 'medication']
];

var store = new Ext.data.ArrayStore({
fields: [{
name: 'title'
},
{
name: 'description'
},
{
name: 'report_for'
}]
});

store.loadData(myData);



if (!win) {

var winWidth = desktop.getWinWidth() / 1.1;
var winHeight = desktop.getWinHeight() / 1.2;
win = desktop.createWindow({
id: moduleId,
title: 'Reports',
width: winWidth,
height: winHeight,
maximized: true,
iconCls: 'reports-icon-cls',
layout: 'fit',
items: [{
xtype: 'tabpanel',
activeItem: 0,
id: 'reportsTabPanel',
items: [{
title: 'Reports',
items: [{
xtype: 'grid',
id: 'allReportsGrid',
columnLines: true,
autoHeight: true,
stripeRows: true,
tbar: {
xtype: 'toolbar',
items: ['->',
{
text: 'Run Report',
disabled: true,
id: 'runReportBtn',
handler: this.addNewtab,
scope: this,
}, ' ']
},
viewConfig: {
forceFit: true,
},
selModel: new Ext.grid.RowSelectionModel({
listeners: {
rowselect: function (sel, row, rec) {
Ext.getCmp('runReportBtn').enable();
},
rowdeselect: function (sel, row, rec) {
Ext.getCmp('runReportBtn').disable();
}
}
}),
store: store,

columns: [{
header: 'Title',
dataIndex: 'title',
width: 100
},
{
header: 'Description',
dataIndex: 'description',
width: 200
}, ],
listeners: {
rowdblclick: this.addNewtab,
scope: this
},
}]
}]
}]
})
}
win.show();
},

addNewtab: function () {

var url = this.app.connection;
var moduleId = this.moduleId;

var tabpanel = Ext.getCmp('reportsTabPanel');
var rec = Ext.getCmp('allReportsGrid').getSelectionModel().getSelected();
var title = rec.get('title').replace(/^\s+/, '').replace(/\s+$/, '');
var tabId = title.toLowerCase();
var tabId = tabId.replace(/ /g, '_');


// varaible getting the value which function to call
var reportTab = rec.get('report_for');

if (Ext.getCmp(tabId)) {
tabpanel.setActiveTab(tabId);
return;
}

var tabs = Ext.getCmp('reportsTabPanel').add({
title: title,
id: tabId,
layout: 'fit',
closable: true,

items: this[reportTab](),
//reportTab, //calling the function according to selected record
scope: this,

});
tabpanel.setActiveTab(tabs);
},


diagnosis: function () {
var url = this.app.connection;
var moduleId = this.moduleId;
var report_item = [{
xtype: 'panel',
layout: 'border',
items: [{
xtype: 'form',
region: 'north',
autoHeight: true,
frame: true,
bodyStyle: 'padding : 10px;',
items: [{
xtype: 'fieldset',
border: false,
width: 280,
style: 'padding:0px;margin:0px; float : left',
labelWidth: 55,
items: [{
xtype: 'combo',
style: 'float:left',
fieldLabel: 'Providers',
}]
},
{
xtype: 'button',
text: 'Advance Search',
style: 'float : left',
handler: function () {
//Ext.getCmp('check').show();
}
}]
},
{
xtype: 'grid',
region: 'center',
id: 'center_grid',
viewConfig: {
forceFit: true,
},
store: new Ext.data.Store({}),
columns: [{
header: 'Patient Name',
dataIndex: ''
},
{
header: 'IDC9 Code',
dataIndex: ''
},
{
header: 'Diagnosis',
dataIndex: ''
},
{
header: 'Dx Date',
dataIndex: ''
},
{
header: 'Last Seen',
dataIndex: ''
},
{
header: 'Provider',
dataIndex: ''
}, ]
}]
}];

return report_item;

},
medication: function () {
var url = this.app.connection;
var moduleId = this.moduleId;
var medication_tab = [{
xtype: 'panel',
layout: 'border',
items: [{
xtype: 'form',
region: 'north',
autoHeight: true,
frame: true,
bodyStyle: 'padding : 10px;',
items: [{
xtype: 'fieldset',
border: false,
width: 280,
style: 'padding:0px;margin:0px; float : left',
labelWidth: 55,
items: [{
xtype: 'combo',
style: 'float:left',
fieldLabel: 'Providers',
}]
},
{
xtype: 'button',
text: 'Advance Search',
style: 'float : left',
handler: function () {

}
}]
},
{
xtype: 'grid',
region: 'center',
id: 'center_grid',
viewConfig: {
forceFit: true,
},
store: new Ext.data.Store({}),
columns: [{
header: 'Patient Name',
dataIndex: ''
},
{
header: 'Medication',
dataIndex: ''
},
{
header: 'Strength',
dataIndex: ''
},
{
header: 'Rx Start Date',
dataIndex: ''
},
{
header: 'Rx Stop Date',
dataIndex: ''
},
{
header: 'Last Seen',
dataIndex: ''
},
{
header: 'Provider',
dataIndex: ''
}, ]
}]
}];

return medication_tab;
}
})


This code calling dynamic functions for the items of tab.
items: this[reportTab]()


Thanks!
I Hope it will help
Admin

Wednesday, July 7, 2010

http://www.knowledgepedia.org

Hi Friends,
I have launched a forum website for web masters for sharing and getting their knowledge. There are many topics like extjs, cakephp, php, joomla etc. for discussion.
You can check it here: http://www.knowledgepedia.org

Thanks!
N

Friday, June 4, 2010

Validate space in Java Script


function trim() {
ogg =document.getElementById('testid').value;
ogg1 = /\S+/.test(ogg);
//return /\S+/.test(ogg);

if(ogg1==" "){alert('blank');}
else{alert(ogg1);}
}
end script

input type="text" onblur="trim();" id="testid"

Tuesday, May 18, 2010

EXTJS Hide Tab Panels

This is for hide the tab
Ext.getCmp(tabpanel_id).hideTabStripItem(tabitem_id);

This is for show the tab again
Ext.getCmp(tabpanel_id).unhideTabStripItem(tabitem_id);

Thanks!

Thursday, May 13, 2010

Prime Number Program

function IsPrime($number)
{
if ($number < 2) { /* We don't want zero or one showing up as prime */
return FALSE;
}
for ($i=2; $i<=($number / 2); $i++) {
if($number % $i == 0) { /* Modulus operator, very useful */
return FALSE;
}
}
return TRUE;
}

for($i = 0; $i < 100; $i++)
{
echo $i." is a prime number? ".IsPrime($i)."
";
}