by marcusmagalhaes » Wed Aug 03, 2016 6:07 pm
cutefields2.1.php
if($thisType == "String"){
$buffer .= '<legend>'.$thisDesc.'</legend><input type="text" name="'.$thisField.'" id="'.$thisField.'" value="'.$thisValue.'"/><input type="button" value="Localizar no Servidor" onclick="BrowseServer();" /><br /><br />';
cute.js
//CKFinder - Popup
function BrowseServer()
{
// You can use the "CKFinder" class to render CKFinder in a page:
var finder = new CKFinder();
finder.basePath = '../'; // The path for the installation of CKFinder (default = "/ckfinder/").
finder.selectActionFunction = SetFileField;
finder.popup( { width : 850, height : 600, popupTitle : 'CKFinder Popup', popupFeatures : 'menubar=yes,modal=yes' } );
// It can also be done in a single line, calling the "static"
// popup( basePath, width, height, selectFunction ) function:
// CKFinder.popup( '../', null, null, SetFileField ) ;
//
// The "popup" function can also accept an object as the only argument.
// CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ;
}
// This is a sample function which is called when a file is selected in CKFinder.
function SetFileField( fileUrl )
{
document.getElementById( 'url' ).value = fileUrl; -------> url = cutefields field name ...
}
I love cnr!