fck_hiddenfield.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  2. <!--
  3. * FCKeditor - The text editor for internet
  4. * Copyright (C) 2003-2005 Frederico Caldeira Knabben
  5. *
  6. * Licensed under the terms of the GNU Lesser General Public License:
  7. * http://www.opensource.org/licenses/lgpl-license.php
  8. *
  9. * For further information visit:
  10. * http://www.fckeditor.net/
  11. *
  12. * "Support Open Source software. What about a donation today?"
  13. *
  14. * File Name: fck_hiddenfield.html
  15. * Hidden Field dialog window.
  16. *
  17. * File Authors:
  18. * Frederico Caldeira Knabben (fredck@fckeditor.net)
  19. -->
  20. <html>
  21. <head>
  22. <title>Hidden Field 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">
  27. var oEditor = window.parent.InnerDialogLoaded() ;
  28. // Gets the document DOM
  29. var oDOM = oEditor.FCK.EditorDocument ;
  30. var oActiveEl = oEditor.FCKSelection.GetSelectedElement() ;
  31. window.onload = function()
  32. {
  33. // First of all, translate the dialog box texts
  34. oEditor.FCKLanguageManager.TranslatePage(document) ;
  35. if ( oActiveEl && oActiveEl.tagName == 'INPUT' && oActiveEl.type == 'hidden' )
  36. {
  37. GetE('txtName').value = oActiveEl.name ;
  38. GetE('txtValue').value = oActiveEl.value ;
  39. }
  40. else
  41. oActiveEl = null ;
  42. window.parent.SetOkButton( true ) ;
  43. }
  44. function Ok()
  45. {
  46. if ( !oActiveEl )
  47. {
  48. oActiveEl = oEditor.FCK.EditorDocument.createElement( 'INPUT' ) ;
  49. oActiveEl.type = 'hidden' ;
  50. oActiveEl = oEditor.FCK.InsertElementAndGetIt( oActiveEl ) ;
  51. }
  52. oActiveEl.name = GetE('txtName').value ;
  53. SetAttribute( oActiveEl, 'value', GetE('txtValue').value ) ;
  54. return true ;
  55. }
  56. </script>
  57. </head>
  58. <body style="OVERFLOW: hidden" scroll="no">
  59. <table height="100%" width="100%">
  60. <tr>
  61. <td align="center">
  62. <table border="0" class="inhoud" cellpadding="0" cellspacing="0" width="80%">
  63. <tr>
  64. <td>
  65. <span fckLang="DlgHiddenName">Name</span><br>
  66. <input type="text" size="20" id="txtName" style="WIDTH: 100%">
  67. </td>
  68. </tr>
  69. <tr>
  70. <td>
  71. <span fckLang="DlgHiddenValue">Value</span><br>
  72. <input type="text" size="30" id="txtValue" style="WIDTH: 100%">
  73. </td>
  74. </tr>
  75. </table>
  76. </td>
  77. </tr>
  78. </table>
  79. </body>
  80. </html>