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 = GetAttribute( oActiveEl, 'value' ) ;
GetE('txtSelected').checked = oActiveEl.checked ;
}
else
oActiveEl = null ;

window.parent.SetOkButton( true ) ;
}

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

oActiveEl.name = GetE('txtName').value ;
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;

if ( GetE('txtSelected').checked )
{
SetAttribute( oActiveEl, 'checked', 'checked' ) ;
oActiveEl.checked = GetE('txtSelected').checked ;
}

return true ;
}










Name





Value




Checked









Wyszukiwarka

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

więcej podobnych podstron