add session start at top of page,without space.
< ?php session_start();
in line 01
and also
Using UTF-8 encoding WITHOUT BOM (Byte Order Mark) seems to fix the
problem
use notepad++ encording
Java Script
Monday, July 2, 2018
Friday, June 8, 2018
Pass Iframe value to parent page using java script
parent.document.getElementById('reasonidParent').value= document.getElementById('reasonid').value;;
After Select in html, Change ifame values using php and java script
Steps
01.when select call onchange event in java script
02.Then ammend value to iframe src like (var val='reason.php?id='+selectoptionvalue;)
03. chenge iframe src using setAttribute like window.document.getElementById('frmreason').setAttribute("src",val);
04. Then get that id value in iframe page using $_GET['id']
======================CODE======================================
In main page....
IN Select????????????????????????????????????
SELECT id='unitFRM' NAME='unit'onchange="reload_message_frame()"
............................................................
In IFRAME????????????????????????????????iframe id="frmreason" src="reason.php" style="width: 230px; height: 50px;border:none" onload="test()"
..........................................................................
Add Java Script AS....
//reloadreason list within ifram in change src
function reload_message_frame() {
var frame_id = 'frmreason';
// add UNIT ID TOURL
var idunit = document.getElementById('unitFRM').value;
var val='reason.php?id='+idunit;
window.document.getElementById('frmreason').setAttribute("src",val);
}
In IFRAME PAGE (reason.php)
if(isset($_GET['id'])){
$idunit=$_GET['id'];
//set $idunit as you wish
01.when select call onchange event in java script
02.Then ammend value to iframe src like (var val='reason.php?id='+selectoptionvalue;)
03. chenge iframe src using setAttribute like window.document.getElementById('frmreason').setAttribute("src",val);
04. Then get that id value in iframe page using $_GET['id']
======================CODE======================================
In main page....
IN Select????????????????????????????????????
SELECT id='unitFRM' NAME='unit'onchange="reload_message_frame()"
............................................................
In IFRAME????????????????????????????????iframe id="frmreason" src="reason.php" style="width: 230px; height: 50px;border:none" onload="test()"
..........................................................................
Add Java Script AS....
//reloadreason list within ifram in change src
function reload_message_frame() {
var frame_id = 'frmreason';
// add UNIT ID TOURL
var idunit = document.getElementById('unitFRM').value;
var val='reason.php?id='+idunit;
window.document.getElementById('frmreason').setAttribute("src",val);
}
In IFRAME PAGE (reason.php)
if(isset($_GET['id'])){
$idunit=$_GET['id'];
//set $idunit as you wish
Wednesday, November 9, 2011
CRM 2011 - how to set 'Filter On' filter to value 'All' for Activities
Add this Script Library and add ChangeFilterLoad to Form Load
function ChangeFilterLoad() {
if (document.getElementById('navActivities') != null) {
document.getElementById('navActivities').onclick = function () {
loadArea('areaActivities');
ChangeFilter();
}
}
}
function ChangeFilter() {
//Activity scheduledend options
var ActivityOptions =
{
All: "All",
Overdue: "Overdue",
Today: "Today",
Tomorrow: "Tomorrow",
Next7Days: "NextXDays;7",
Next30Days: "NextXDays;30",
Next90Days: "NextXDays;90",
Next6Months: "NextXMonths;6"
}
//Activity History actualend options
var HistoryOptions =
{
All: "All",
Today: "Today",
Yesterday: "Yesterday",
Last7Days: "LastXDays;7",
Last30Days: "LastXDays;30",
Last90Days: "LastXDays;90",
Last6Months: "LastXMonths;6",
Last12Months: "LastXMonths;12"
}
sArea = "areaActivities";
//create the iframe object
var iframe = document.getElementById(sArea + "Frame");
iframe.onreadystatechange = function()
{
if( iframe.readyState == "complete")
{
var picklist, option;
//reference to the iframe document
var iframeDoc = iframe.contentWindow.document;
switch (sArea) {
case "areaActivities":
picklist = (iframeDoc.getElementById('crmGrid_Contact_ActivityPointers_scheduledend'));//This is the drop daown id attact to contact form
/* change to suit your needs */
option = ActivityOptions.All;
break;
default: return;
}
picklist.value = option;
picklist.FireOnChange();
}
}
}
function ChangeFilterLoad() {
if (document.getElementById('navActivities') != null) {
document.getElementById('navActivities').onclick = function () {
loadArea('areaActivities');
ChangeFilter();
}
}
}
function ChangeFilter() {
//Activity scheduledend options
var ActivityOptions =
{
All: "All",
Overdue: "Overdue",
Today: "Today",
Tomorrow: "Tomorrow",
Next7Days: "NextXDays;7",
Next30Days: "NextXDays;30",
Next90Days: "NextXDays;90",
Next6Months: "NextXMonths;6"
}
//Activity History actualend options
var HistoryOptions =
{
All: "All",
Today: "Today",
Yesterday: "Yesterday",
Last7Days: "LastXDays;7",
Last30Days: "LastXDays;30",
Last90Days: "LastXDays;90",
Last6Months: "LastXMonths;6",
Last12Months: "LastXMonths;12"
}
sArea = "areaActivities";
//create the iframe object
var iframe = document.getElementById(sArea + "Frame");
iframe.onreadystatechange = function()
{
if( iframe.readyState == "complete")
{
var picklist, option;
//reference to the iframe document
var iframeDoc = iframe.contentWindow.document;
switch (sArea) {
case "areaActivities":
picklist = (iframeDoc.getElementById('crmGrid_Contact_ActivityPointers_scheduledend'));//This is the drop daown id attact to contact form
/* change to suit your needs */
option = ActivityOptions.All;
break;
default: return;
}
picklist.value = option;
picklist.FireOnChange();
}
}
}
Monday, November 7, 2011
Backup SQL Server 2008 R2 Restore on SQL 2008
- Install an instance of SQL 2008 R2 on one machine and SQL 2008 on another
- Open SQL Server Management Studio R2
- Select your source Database
- Select Tasks>Generate Scripts.
- Select 'Script entire database and all database objects', press 'Next'
- Select 'Save to File' and click on the 'Advanced' button
- Select 'Script for Server Version' and select the version you want: 200/2005/2008
- Select 'Type of data to Script' and select Schema/Data/both
- Click 'OK',Next and do it!
- Copy the resulting file to the target machine with SQL 2008 [or whatever]
- Log onto your SQL Management Studio and open the copied .sql file... be aware that there may be limitations on the file size.
There may also be issues with the order that the .SQL file inserts the data into the target database and if there are FK constraints in place, this could be an issue.... simply re-order the insert lists.
- Once the .sql file is organised, parse it [just to sure], and then execute.
Thursday, October 27, 2011
CRM 2011 - Form Loading Error
Error Message: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Error Details: Exception of type 'System.Web.HttpUnhandledException' was thrown. Source File: Not available Line Number: Not available Request URL: https://devfia.readymembership.com:4433/userdefined/edit.aspx?_gridType=1&etc=1&id=%7b702EC9A0-B3FF-E011-9548-87FF2896E5A3%7d&pagemode=iframe&rskey=894977316&sitemappath=Workplace%7cMyWork%7cnav_dashboards Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.] at Microsoft.Crm.Application.Controls.AppNavigationBar.CreateOrderedAreas(NavPaneItems navPaneItems)
------------------------------------------------------------------------------
------------------------------------------------------------------------------
To Resolve This Import Customization Again as Manage Solution.
Tuesday, October 18, 2011
Run 32 bit .NET applications on 64 bit machines
Open up command prompt and type this command
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe SetWow
Now you should be able to run apps that use only the .NET 32 bit CLR.
To revert back to the default 64 bit framework run
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe Set64
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe SetWow
Now you should be able to run apps that use only the .NET 32 bit CLR.
To revert back to the default 64 bit framework run
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Ldr64.exe Set64
Subscribe to:
Posts (Atom)