1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
3
* FCKeditor - The text editor for internet
4
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
6
* Licensed under the terms of the GNU Lesser General Public License:
7
* http://www.opensource.org/licenses/lgpl-license.php
9
* For further information visit:
10
* http://www.fckeditor.net/
12
* "Support Open Source software. What about a donation today?"
14
* File Name: fck_radiobutton.html
15
* Radio Button dialog window.
18
* Frederico Caldeira Knabben (fredck@fckeditor.net)
22
<title>Radio Button Properties</title>
23
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24
<meta content="noindex, nofollow" name="robots">
25
<script src="common/fck_dialog_common.js" type="text/javascript"></script>
26
<script type="text/javascript">
28
var oEditor = window.parent.InnerDialogLoaded() ;
30
// Gets the document DOM
31
var oDOM = oEditor.FCK.EditorDocument ;
33
var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
35
window.onload = function()
37
// First of all, translate the dialog box texts
38
oEditor.FCKLanguageManager.TranslatePage(document) ;
40
if ( oActiveEl && oActiveEl.tagName.toUpperCase() == 'INPUT' && oActiveEl.type == 'radio' )
42
GetE('txtName').value = oActiveEl.name ;
43
GetE('txtValue').value = oEditor.FCKBrowserInfo.IsIE ? oActiveEl.value : GetAttribute( oActiveEl, 'value' ) ;
44
GetE('txtSelected').checked = oActiveEl.checked ;
49
window.parent.SetOkButton( true ) ;
56
oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
57
oActiveEl.type = 'radio' ;
58
oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
61
if ( GetE('txtName').value.length > 0 )
62
oActiveEl.name = GetE('txtName').value ;
64
if ( oEditor.FCKBrowserInfo.IsIE )
65
oActiveEl.value = GetE('txtValue').value ;
67
SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
69
var bIsChecked = GetE('txtSelected').checked ;
70
SetAttribute( oActiveEl, 'checked', bIsChecked ? 'checked' : null ) ; // For Firefox
71
oActiveEl.checked = bIsChecked ;
78
<body style="OVERFLOW: hidden" scroll="no">
79
<table height="100%" width="100%">
82
<table border="0" cellpadding="0" cellspacing="0" width="80%">
85
<span fckLang="DlgCheckboxName">Name</span><br>
86
<input type="text" size="20" id="txtName" style="WIDTH: 100%">
91
<span fckLang="DlgCheckboxValue">Value</span><br>
92
<input type="text" size="20" id="txtValue" style="WIDTH: 100%">
96
<td><input type="checkbox" id="txtSelected"><label for="txtSelected" fckLang="DlgCheckboxSelected">Checked</label></td>