James,
Is just not working right now... They probably changed something...
norberto wrote:Antonio, but ie9 is more secure, or not? see: (one of several overview):
James Bott wrote:Antonio,
The sandbox looks great. However, maybe I don't understand it, but the Run button is not showing the code in the edit screen (the displayed text is different than what is in the edit display). This is not the case in your included screenshot, but it is the case when I run the code example. Please explain.
James
function Dialog( cTitle, nWidth, nHeight )
{
var body = document.body;
this.overlay = document.createElement( "div" );
this.dlg = document.createElement( "div" );
this.oldDlg = oDlg;
this.oldFrame = oFrame;
this.overlay.className = "overlay";
this.overlay.id = "overlay";
this.overlay.style.height = window.screen.height;
this.overlay.style.width = window.screen.width;
body.appendChild( this.overlay );
this.dlg.className = "dialog";
this.dlg.id = "dialog";
this.dlg.style.width = nWidth;
this.dlg.style.height = nHeight;
this.dlg.style.top = ( parseFloat( window.screen.height ) / 2 ) - ( parseFloat( this.dlg.style.height ) );
this.dlg.style.left = ( parseFloat( window.screen.width ) / 2 ) - ( parseFloat( this.dlg.style.width ) / 2 );
this.dlg.innerHTML = "<h2>" + cTitle + "</h2>";
body.appendChild( this.dlg );
this.End = function() { this.dlg.parentNode.removeChild( this.dlg );
this.overlay.parentNode.removeChild( this.overlay );
oDlg = this.oldDlg; oFrame = this.oldFrame; };
this.GetControl = function( cName ) { var aControls = document.getElementsByName( cName );
if( aControls.length > 0 )
return aControls[ aControls.length - 1 ];
else
return null; };
}
function Dialog( cTitle, nWidth, nHeight )
{
var body = document.body;
this.overlay = document.createElement( "div" );
this.dlg = document.createElement( "div" );
this.oldDlg = oDlg;
this.oldFrame = oFrame;
this.overlay.className = "overlay";
this.overlay.id = "overlay";
if (/Firefox/.test(navigator.userAgent))
this.overlay.style.height = window.screen.height - 106;
else if (/MSIE/.test(navigator.userAgent))
this.overlay.style.height = window.screen.height - 131;
else
this.overlay.style.height = window.screen.height - 101;
if (/MSIE/.test(navigator.userAgent))
this.overlay.style.width = window.screen.width - 23 ;
else
this.overlay.style.width = window.screen.width ;
body.appendChild( this.overlay );
this.dlg.className = "dialog";
this.dlg.id = "dialog";
this.dlg.style.width = nWidth;
this.dlg.style.height = nHeight;
if (/MSIE/.test(navigator.userAgent))
{
var oDlgHeight = ( parseFloat( body.parentNode.clientHeight ) / 2 ) - ( parseFloat( this.dlg.style.height ) / 2);
var oDlgWidth = ( parseFloat( body.parentNode.clientWidth ) / 2 ) - ( parseFloat( this.dlg.style.width ) / 2 );
if ( oDlgHeight >= 40 )
oDlgHeight = oDlgHeight;
else
oDlgHeight = 48;
if ( oDlgWidth >= 0 )
oDlgWidth = oDlgWidth;
else
oDlgWidth = 1;
this.dlg.style.top = oDlgHeight;
this.dlg.style.left = oDlgWidth;
}
else
{
var oDlgHeight = ( parseFloat( body.clientHeight ) / 2 ) - ( parseFloat( this.dlg.style.height ) / 2 );
var oDlgWidth = ( parseFloat( body.clientWidth ) / 2 ) - ( parseFloat( this.dlg.style.width ) / 2 );
if ( oDlgHeight >= 40 )
oDlgHeight = oDlgHeight;
else
var oDlgHeight = 42;
if ( oDlgWidth >= 0 )
oDlgWidth = oDlgWidth;
else
oDlgWidth = 1;
this.dlg.style.top = oDlgHeight;
this.dlg.style.left = oDlgWidth;
}
this.dlg.innerHTML = "<h2>" + cTitle + "</h2>";
body.appendChild( this.dlg );
this.End = function() { this.dlg.parentNode.removeChild( this.dlg );
this.overlay.parentNode.removeChild( this.overlay );
oDlg = this.oldDlg; oFrame = this.oldFrame; };
this.GetControl = function( cName ) { var aControls = document.getElementsByName( cName );
if( aControls.length > 0 )
return aControls[ aControls.length - 1 ];
else
return null; };
}
function Get( nTop, nLeft, cText, oDlg, nWidth, nHeight, cId )
{
document.getElementsByClassName = function(class_name) {
var docList = this.all || this.getElementsByTagName('*');
var matchArray = new Array();
/*Create a regular expression object for class*/
var re = new RegExp("(?:^|\\s)"+class_name+"(?:\\s|$)");
for (var i = 0; i < docList.length; i++) {
if (re.test(docList[i].className) ) {
matchArray[matchArray.length] = docList[i];
}
}
return matchArray;
}//eof annonymous function
var get = document.createElement( "input" );
var aGets = document.getElementsByClassName( "get" );
get.type = "text";
get.className = "get";
if( typeof cId != "undefined" )
get.id = cId;
else
get.id = "get";
get.style.position = "absolute";
get.style.top = nTop;
get.style.left = nLeft;
get.style.width = nWidth;
get.style.height = nHeight;
get.value = cText;
get.name = "get" + ( aGets.length + 1 ).toString();
if( typeof oDlg != "undefined" )
oDlg.dlg.appendChild( get );
else
document.body.appendChild( get );
}
function ChangeGet( cId, cText )
{
var change = document.getElementById(cId);
change.value = cText;
}
Get( 220 -8,180, "Sin Cambiar", undefined, 200, 30, 'g1' );
ChangeGet( "g1", "Get Cambiado...!!!!" );
var image = document.createElement( "image" );
var image = document.createElement( "img" );
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 19 guests