fck radiobutton






Radio Button Properties





var oEditor = window.parent.InnerDialogLoaded() ;

// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;

var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;

window.onload = function()
{
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document) ;

if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
{
GetE('txtName').value = oActiveEl.name ;
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
GetE('txtSelected').checked = oActiveEl.checked ;
}
else
oActiveEl = null ;

window.parent.SetOkButton( true ) ;
window.parent.SetAutoSize( true ) ;
}

function Ok()
{
oEditor.FCKUndo.SaveUndoStep() ;

if ( !oActiveEl )
{
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
oActiveEl.type = 'radio' ;
oActiveEl = oEditor.FCK.InsertElement( oActiveEl ) ;
}

if ( GetE('txtName').value.length > 0 )
oActiveEl.name = GetE('txtName').value ;

if ( oEditor.FCKBrowserInfo.IsIE )
oActiveEl.value = GetE('txtValue').value ;
else
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;

var bIsChecked = GetE('txtSelected').checked ;
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
oActiveEl.checked = bIsChecked ;

return true ;
}










Name





Value




Checked









Wyszukiwarka

Podobne podstrony:
fck radiobutton
fck anchor
fck paste
fck template
fck anchor
fck spellerpages

więcej podobnych podstron